Set GCM API key from C#

Hi,
I need to send GCM message to multiple devices using multiple GCM API Key(send ID)
I am learning to use Azure Notification Hub. I have a set of GCM API Key(send ID) in my Database. 
Step1: I read a message (containing the Email ID and GCM ID of a device)
Step2: I Get the GCM API Key(send ID) for the corresponding user Email ID.
Step3: Need to attach this GCM API Key(send ID) with the AzureNotificationHub
Step4: Need to push a Message to the device using the above set credentials.
Is this a best method..? If not any solution.

this link contains a tutorial :
http://www.tejaprakash.com/2013/05/push-messages-to-gcm-server-using-net.html

Similar Messages

  • Where to store an API Key - properties or somewhere else.

    I'm developing an ADF Faces application with 10.1.3.3 that uses the Google Maps API. This API requires that you obtain an api key - long indecipherable text string from Google that you use from the Javascript routines that call the API. I stored this key in a properties file in the ViewController project, that I bring into the page with the map with <f:loadBundle /> and I reference the api key with appropriate EL to get it from the file.
    This works fine, but I have a deployment problem. Google produces API keys that are for a specific website, and don't work from any other site. So I have a different key for my deployed application than on my development workstation where I run the embedded OC4J for testing. Every time I redeploy, the API key from development overwrites the copy on the application server (OAS 10.1.3), and of course, since that is a different website, the Google stuff stops working until I fix the properties file on the application server and restart the application. I made a copy of the correct version of the properties file, so I can do this, but it is a pain.
    By the way, because of firewall problems, I redeploy with the Enterprise Manager web console, and an EAR file, not with JDeveloper.
    Is there a better way? Is there a better place to store the key so that it doesn't get updated on the application server when I redeploy? Is there a way I can tell JDeveloper or the application server not to overwrite the properties file when I redeploy?

    Hello Jflack,
    One thing I might suggest you do is to store the value in an application-scoped managed bean property that is initialized from the database. I currently do this for instance-specific (dev/prod/test/etc) values that need to change, such as the URL of a reporting server. In the constructor for this managed bean, I grab an Application Module, find a view object, execute it, and grab the values, stuffing them inside a bean property. You can then refer to the value in the page using an EL expression.
    Not sure if this method is possible for you, but it works well for me.
    John

  • Google API Keys for GCM in Chromium looks like dont work

    I am trying to use the service of Push Messaging function of Chrome(Chromium), theoretically I have to get a ChannelId where the communication would be established between the browser and Google Cloud Messaging(GCM), in Chrome I can get that Channel without problems, but in Chromium I don't get Channel, I don't get error, only I don't have anything, I contacted some people in the forums for Chromium and they suggest that the API keys for this funcionality(Google CLoud Messaging) maybe are not correct or there is a problem with the API  keys embedded in the build of Chromium for Arch.
    I don't know if this is the correct place to post this question, the people of Chromium suggested me that I contact to the package mantainer to reviwe if there is a problem with these API keys.
    I am using Arch 3.9.4-1, Chromium 27.0.1453.93 (Build para desarrolladores 200836).
    If this is not the correct place to post this kind of question and somebody knows where can I post it please tell me, and if somedoby can help me with my question I would be thankful.
    Thanks in advance.

    Hi Gsaison,
    Do you have any progress on these issues? Im working on the same solution right now (SWV + GoogleMaps JS v3 ) I've got some weird issue when i try to spawn a StageWebView inside a View on IOS, it appears inside a scroller and is not open for finger interaction anymore. I use the eskimo framework, but then again, nothing fancy going on there for the rest. I've tried all of the the stage.stageScaleMode options but non of them work. Got any help?
    Kind regards,
    Roy

  • Setting user key from a business event

    Hi,
    Is there an easy way that I can set the user key for a workflow instance via BES?
    My event will create a new process instance, taking the event key as the item key. However, in order to make searching etc. a bit easier, I want to set the user key at the same time (i.e. when the process is instantiated).
    Is there any way that I can do this without having to write custom PL/SQL?
    TIA,
    Matt

    Hi Dawn,
    Use SE16N - with &SAP_EDIT functionality for this kind of abnormal data.
    Or else use RHRHDC00 report with otype E objid id of the course infotype 1001 subtype A023.
    Regards,
    Dilek

  • Get all keys from Cache

    Hi,
    I have a scenario where I have a backing store attached to the cache and running the server in a fault tolerant mode. Because of fault tolerance when a new node joins the cluster it is required to recover the data from the cache. When using NamedCache.keySet() I get only the keys which are in the cache and not the ones persisted in the Backing store.
    How do I go about getting the whole set of keys from the cache and backing store using the Tangosol API ?

    Here is my cache-config file. The CacheStore implementation is quite big and I need to check with my manager to share it on the forum. Maybe this will continue through the regular support channel.
    Message was edited by: pkdhar<br><br> <b> Attachment: </b><br>coherence-cache-config.xml <br> (*To use this attachment you will need to rename 465.bin to coherence-cache-config.xml after the download is complete.)

  • Getting KEYS from a database!

    Hi Everybody,
    I have a serious problem! I have to get the Keys(Column Names) from a Database (MS-ACCESS) Table.
    JDBC2.0 contains a class called DatabaseMetaData. It has functions like getPrimaryKeys(), getImportedKeys() and getExportedKeys(), all of which I have to use. But I'm unable to access these functions because the "Driver does not support these functions". I tried using the JDBC-ODBC driver, IDS Server Driver and the JDataConnect drivers. All of them gives the same error message.
    Is there any way to get the Keys from the table?
    I found a way to get the Primary Keys - I'm getting it from the Indexes - getIndexInfo() function.
    But I haven't found a way to get the Foreign keys and other keys in the tables.
    Does anybody know how to get the keys from an MS-ACCESS database?
    Thanks,
    TechnoSam.

    The JDBC API is mainly a set of interfaces required to be implemented by the JDBC Driver vendor. Because these are interfaces, the vendor is free to actually implement whatever logic they see fit, but of course they will implement what is required.
    I would suspect if you are getting a 'Not supported by Driver' type error, it is because the vendor had to implement that method, but did not implement it with code that does the desired logic.
    Most likely, this was either very, very hard to do or just could not be done give that the driver was written for a particular database.
    If this is something you need, I can only suggest trying to write a procedure (can you do that in MSAccess?) which does the logic you need (in Access) and returns the info you want. You can then access it via a CallableStatement.
    Hope this helps.

  • Key from a String

    Hi to all,
    i have a big problem.
    I must set an RSA key value (Modulus and Exponent) from a String conteining the encrypted value
    ( for example :hVqLzLgUeZTxQ95UdJDTpIwbf6F7v.... ).
    Is possible to do this ?
    I didn't found classes and method to do this from the API.
    Somebody can help me?
    thank you!

    ghstark wrote:
    z4c4gn0 wrote:
    Hi to all,
    i have a big problem.
    I must set an RSA key value (Modulus and Exponent) from a String conteining the encrypted value
    ( for example :hVqLzLgUeZTxQ95UdJDTpIwbf6F7v.... ). Is possible to do this ?
    I didn't found classes and method to do this from the API.
    Somebody can help me?
    I cannot offer much help without more clarifying details, though perhaps others can deduce what you need. Just from the little you have written, I might guess that you have a base64 encoded (*not* encrypted) string or strings containing the RSA modulus and exponent. In that case, I know sabre150 has shown what to do, so search this forum for posts containing keywords "XML " and "RSA". Also, examine the class http://java.sun.com/javase/6/docs/api/java/security/spec/RSAPublicKeySpec.html as well as the base64 decoders from the jakarta commons codex classes.
    I must get the keyinfo from an XML Signed file, and use this parameters for sign another one, so
    i have my class that return the String value of RSA Module and Exponent parsed.
    Now i need to sign using this parameters, and i tried the RSAPublicKeySpec that you said
    in this way:
    String mod="blablalba"; //the string module parsed
    String exp ="blablalba"; //the string exponend parsed
    byte [] modbyte=mod.getBytes();
    byte [] expbyte=exp.getBytes();
    BigInteger modulus = new BigInteger(modbyte);
    BigInteger publicExponent =new BigInteger(expbyte);
    System.out.println(exp+" = "+publicExponent);
    System.exit(0);
    RSAPublicKeySpec keySpec = new RSAPublicKeySpec(modulus, publicExponent);
    KeyFactory keyFactory = KeyFactory.getInstance("RSA");
    RSAPublicKey pk = (RSAPublicKey)keyFactory.generatePublic(keySpec);
    that's work but don't return the right value of parameters, because Transform the strings in BigInteger.
    What can i do?
    thanks

  • IWeb page generates IE9 error for Google Maps API key

    My iWeb site generates an error in IE9 "This web site needs a different Google Maps API key". Is there any fix in iWeb for this?
    I've found this link that offers a solution for IE9 users. It seems to be a bug with IE9 mixed content security settings, but people will blame my website and not their browser
    http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/ie-9-is-telling-me-my- website-needs-a-different/59bfa1ed-f757-e011-8dfc-68b599b31bf5
    Excerpt from that site "Okay, I resolved the issue. I went into my Security settings. Under Miscellaneous I changed Display mixed content to "Enable". I believe there is a bug in the Display mixed content feature. I should be able to keep the setting at "Prompt", then see the content when I click the appropriate option when prompted. I believe the Google Maps API message was shown in error."

    You have to get your own API key: https://code.google.com/apis/console/
    My map uses a custom solution (Web Apps & Google Maps API V3) and is still working fine.

  • I set up Firefox sync from my old computer. This has had its hard drive replaced and been sold. I now want to retrieve the information and got my bookmarks on my new computer. I can't see any way to do this!

    I set up Firefox sync from my old computer. This has had its hard drive replaced and been sold. I now want to retrieve the information and get my bookmarks on my new computer. I can't see any way to do this!
    Help please

    To build on the second option provided by The Edmeister make sure that you have your Sync Key, if this is not the case Firefox Sync will not help you (data is encrypted with that Key).
    Finally, if the last sync happened long time ago, it may be the case that your data is not on the servers anymore. Firefox Syn wasn't designed as a back up service.

  • EXS24 read root key from file name only

    Has anyone encountered this with EXS24 in Logic 7? If you set preferences to "read root key from file name only" then EXS reads the root key from the file itself when loading samples. On the other hand if you set them to "read root key from file only" then it reads the root key from the file name. Or am I just imagining this?
    P.S. if anyone from Apple is reading, could you please update EXS24? It's a bit primitive by today's standards.

    Hi
    Not a direct answer to your question, but if you are doing a lot of sample mapping etc, you may want to check out Redmatica's KeyMap Pro or the simpler Keymap 1:
    http://www.redmatica.com
    CCT

  • Invalid API Key Error in Ecosign API

    I'm using the sample soap code(Developer kit) given by echosign api for testping, but it always show invalid api key error while i'm executing from terminal. Please give the solution as soon as possible, and i'm not able to get solution from google also.
    This is my API Key:
    Client Secret:
    6IaJHev8N48JbsZcM4Itggzt0pAHF0iS
    I tried with this comment in terminal:
    php demo.php https://secure.echosign.com/services/EchoSignDocumentService20?wsdl 6IaJHev8N48JbsZcM4Itggzt0pAHF0iS test
    This is demo.php file:
    <?php
    // get input
    array_shift($_SERVER['argv']);
    $Url = array_shift($_SERVER['argv']);
    $ApiKey = array_shift($_SERVER['argv']);
    $cmd = array_shift($_SERVER['argv']);
    $params = $_SERVER['argv'];
    if (!$cmd) print_usage();
    $S = new SOAPClient($Url);
    call_user_func("cmd_$cmd", $params);
    function cmd_test() {
        global $Url, $ApiKey, $S;
        print "Testing basic connectivity...\n";
        $r = $S->testPing(array('apiKey' => $ApiKey));
        print "Message from server: {$r->documentKey->message}\n";
        print "Testing file transfer...\n";
        $text = file_get_contents('../test.pdf');
        $r = $S->testEchoFile(array('apiKey' => $ApiKey, 'file' => base64_encode($text)))->outFile;
        if (base64_decode($r) === $text) {
            print "Woohoo! Everything seems to work.\n";
        else {
            die("ERROR: Some kind of problem with file transfer, it seems.\n");
    function cmd_send() {
        global $Url, $ApiKey, $S;
        list($filename, $recipient) = reset(func_get_args());
        $r = $S->sendDocument(array(
            'apiKey' => $ApiKey,
            'documentCreationInfo' => array(
                    'fileInfos' => array(
                        'FileInfo' => array(
                            'file'     => file_get_contents($filename),
                            'fileName' => $filename,
                    'message' => "This is neat.",
                    'name'    => "Test from SOAP-Lite: $filename",
                    'signatureFlow' => "SENDER_SIGNATURE_NOT_REQUIRED",
                    'signatureType' => "ESIGN",
                    'tos' => array( $recipient ),
        print "Document key is: {$r->documentKeys->DocumentKey->documentKey}\n";
    function cmd_info() {
        global $Url, $ApiKey, $S;
        list($doc_key) = reset(func_get_args());
        $r = $S->getDocumentInfo(array('apiKey' => $ApiKey, 'documentKey' => $doc_key))->documentInfo;
        print "Document is in status: {$r->status}\n";
        print "Document History: ";
        foreach($r->events->DocumentHistoryEvent as $_) {
            $keytext =
              $_->documentVersionKey
              ? " (versionKey: {$_->documentVersionKey})"
            print "{$_->description} on {$_->date}$keytext\n";
        print "Latest versionKey: {$r->latestDocumentKey}\n";
    function cmd_latest() {
        global $Url, $ApiKey, $S;
        list ($doc_key, $filename) = reset(func_get_args());
        $r = $S->getLatestDocument(array('apiKey' => $ApiKey, 'documentKey' => $doc_key))->pdf;
        //$r = base64_decode($r);
        file_put_contents($filename, $r);
    function print_usage() {
        die(<<<__USAGE__
    Usage:
      demo.php <URL> <API key> <function> [parameters]
    where the function is one of:
      test
      send <filename> <recipient_email>
      info <documentKey>
      latest <documentKey> <filename>
    test will run basic tests to make sure you can communicate with the web service
    send will create a new agreement in the EchoSign system, and returns a documentKey
    info returns the current status and all the history events for a given documentKey
    latest saves the latest version of the document as a PDF with the given filename
    __USAGE__
    --------------------------  End of file ---------------------------------------------------------------

    This is my API Key:
    Client Secret:
    6IaJHev8N48JbsZcM4Itggzt0pAHF0iS
    Client secret is not the same as an api key!
    in addition to the above, integration key or access codes can be had by going to personal preferences>access code and clicking the plus sign.

  • Google has disable the use of the api key

    I've setup a google static map using the api key v3 in this site www.pequenonim.es.
    Problem is Firefox is giving an error message:
    " Google ha inhabilitado el uso del API de Google Maps para esta aplicación. La clave proporcionada no es una clave de API de Google válida, o no está autorizada para la versión 3 del API de JavaScript de Google Maps en este sitio. Si eres el propietario de esta aplicación, puedes consultar cómo se obtiene una clave válida aquí: https://developers.google.com/maps/documentation/javascript/tutorial#api_key"
    Something like Google has disabled the use of the API for this application. The key is not valid or is not authorized for version 3 of the api of javascript in this site.
    Measurements already taken:
    API v3 and API v2 enable on api code panel
    Reset firefox
    Clean cookies and cache of firefox.
    Map actually works on Chrome and IE10.

    Is it the map on the bottom of the main page? It works for me in Firefox 24 on Windows 7 from California.
    You may want to look at the code in Firefox's source viewer, starting a few lines below id="bottom2", as there are some stray &lt;html>, &lt;head>, and &lt;body> tags that suggest a template or plugin isn't fully compatible with your page.

  • DST - Choose the key from the allowed namespace

    Hi everyone. I am trying to add the new Timezone setting as per note 919538.
    When I do, I get a message "Choose the key from the allowed namespace". Another search in OSS said that this can only be correct with a support pack.
    Does anyone else have experience with this or seen this error?
    Thanks!

    Re: DST - Choose the key from the allowed namespace  
    Posted: Mar 6, 2007 6:36 PM   in response to: Galina Savikovsky           
           Click to reply to this thread      Reply
    Hi friends,
    The problem is , may be you are all trying to click " SAVE" after doing all the entries.
    1. Do all the entries
    2 Click Enter ( or) that green tick mark on the top left corner next to the place where we put the TCODE.
    You will get the transport request for the change you have made
    Hope this helps, points are appreciated
    Uday

  • Loading data into Fact/Cube with surrogate keys from SCD2

    We have created 2 dimensions, CUSTOMER & PRODUCT with surrogate keys to reflect SCD Type 2.
    We now have the transactional data that we need to load.
    The data has a customer id that relates to the natural key of the customer dimension and a product id that relates to the natural key of the product dimension.
    Can anyone point us in the direction of some documentation that explains the steps necessary to populate our fact table with the appropriate surrgoate key?
    We assume that we need to have an lookup table between the current version of the customer and the incoming transaction data - but not sure how to go about this.
    Thanks in advance for your help.
    Laura

    Hi Laura
    There is another way to handling SCD and changing Facts. This is to use a different table for the history. Let me explain.
    The standard approach has these three steps:
    1. Determine if a change has occurred
    2. End Date the existing record
    3. Insert a new record into the same table with a new Start Date and dummy End Date, using a new surrogate key
    The modified approach also has three steps:
    1. Determine if a change has occurred
    2. Copy the existing record to a history table, setting the appropriate End Date en route
    3. Update the existing record with the changed information giving the record a new Start Date, but retaining the original surrogate key
    What else do you need to do?
    The current table can use the surrogate key as the primary key with the natural key being being a unique key. The history table has the surrogate key and the end date in the primary key, with a unique key on the natural key and the end date. For end user queries which in more than 90% of the time go against current data this method is much faster because only current records are in the main table and no filters are needed on dates. If a user wants to query history and current combined then a view which uses a union of the main and historical data can be used. One more thing to note is that if you adopt this approach for your dimension tables then they always keep the same surrogate key for the index. This means that if you follow a strict Kimball approach to make the primary key of the fact table be a composite key made up of the foreign keys from each dimension, you NEVER have to rework this primary key. It always points to the correct dimension, thereby eliminating the need for a surrogate key on the fact table!
    I am using this technique to great effect in my current contract and performance is excellent. The splitter at the end of the map splits the data into three sets. Set one is for an insert into the main table when there is no match on the natural key. Set two is when there is a match on the natural key and the delta comparison has determined that a change occurred. In this case the current row needs to be copied into history, setting the End Date to the system date en route. Set three is also when there is a match on the natural key and the delta comparison has determined that a change occurred. In this case the main record is simply updated with the Start Date being reset to the system date.
    By the way, I intend to put a white paper together on this approach if anyone is interested.
    Hope this helps
    Regards
    Michael

  • Can you set up a key frame on a movie published through iPhoto on .Mac?

    Does anybody know if you can set up a key frame on a movie published through iPhoto on .Mac? I mean the thumbnail for the movie...

    lnbs:
    Welcome to the Apple Discussions. Not in iPhoto. I don't know if you can import the movie into iMovie and set a key frame that way. But that would include some additional encoding to get it out of iMovie and might degrade the quality.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

Maybe you are looking for

  • How to run an "Automator" application at regular time intervals

    I would like to find out how to run an "Automator" application at regular time intervals, say at every 5 minutes. Is there any program, AppleScript or any method to do this? I would very much appreciate a help. Suwan

  • Error in creating a Merge Document

    Hello, I am creating a merge document and want to use a numbers doc for the data source. I created the numbers document and Saved it. Then created the pages doc. Went to inspector and choose the link, browsed to my numbers doc, selected it, then clic

  • Allow "Signing" and "Creation of Template Pages" in Reader XI

    Hi.   I have created a form in Adobe Pro XI that allows the (Reader XI) user to insert additional templates pages by clicking "button X".  The form also provides the user a Digital Signature field to sign the document.   In order for the user to be a

  • G/L Master Record setting not updated in table.

    Hi, This might be very basic question but i am stuck with it. while creating G/L Master data in Control Data Tab there is one function which is not working.  The check "balance only in local currency" Whether i check it or not system is showing balan

  • Azure WCF SSL latency problems

    I have a WCF service running in Azure Worker Role. The service waits for client requests, then fetchs some data from SQL database and finally returns data to client. First, service was using plain unencrypted NetTcpBinding for communication, and late