0

I am newbie to android.

I want to initialize certain parameters like api key and device token (as are in iOS).

Device token which is unique id of iphone,which is used to send notification to that device.

Api key is unique key which identifies our application.(Every third party has its own API key like Facebook,Twitter,Google Plus,etc.)

AND

methods like didRegisterForRemoteNotification and didReceiveRemoteNotification (as are in iOS) in android.

So i want to know alternative for this in android.

In iOS,We store deviceToken to send notification ,But in android what we store to send notification ?

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
Ponting
  • 2,248
  • 8
  • 33
  • 61
  • 1
    You may want to explain more what are they in iOS – Alexander Kulyakhtin Jul 04 '13 at 21:07
  • Agreed. Citing another OS as an an *example* of behavior is fine, but you need to explain *the behavior* clearly for those unfamiliar with the other OS. For example: what "api key"? What "device token"? – CommonsWare Jul 04 '13 at 21:10
  • @CommonsWare;@Alex : Ok,I edited my question. – Ponting Jul 05 '13 at 05:56
  • There are many Android developer support sites on the Internet, offering help in many languages. I have several listed at http://www.andglobe.com. You may have better luck using a site that is a language that is more comfortable for you. – CommonsWare Jul 05 '13 at 10:26

1 Answers1

0

As stated in this guide, you should keep note of the project id (referred to as SENDER_ID in code)

/**
 * Substitute you own sender ID here.
 */
 String SENDER_ID = "Your-Sender-ID";

You'll be using it later for registering the device:

regid = gcm.register(SENDER_ID);
NovaOverflow
  • 235
  • 2
  • 8