Android GCM SENDER_ID, how to get it?
No, the SENDER_ID is the project ID you signed up at Google API console, it should a numeric string. e.g. on your browser URI, you should see this:
https://code.google.com/apis/console/#project:4815162342
The Sender ID is 4815162342
Updated Answer:
Google has not updated its docs completely. The above answer is old and its based on this documentation and it seems that its still not updated.
According to updated Google docs, it seems that Project Number on Google API Console is used as SENDER ID
Android GCM SENDER_ID, how to get it?
No, the SENDER_ID is the project ID you signed up at Google API console, it should a numeric string. e.g. on your browser URI, you should see this:
https://code.google.com/apis/console/#project:4815162342
The Sender ID is 4815162342
Updated Answer:
Google has not updated its docs completely. The above answer is old and its based on this documentation and it seems that its still not updated.
According to updated Google docs, it seems that Project Number on Google API Console is used as SENDER ID
How to get sender_id by receiving gcm notification
extras ().get("from")
should give you the sender ID in your onHandleIntent
method.
Where do I find my GCM sender ID?
With the new rebranding of GCM (Google Cloud Messaging) to FCM (Firebase Cloud Messaging) finding the "GCM Sender Id" and the "API Key" has changed.
To get them:
1- Login to https://console.firebase.google.com
2- Create a new project for your app (or select your project and skip to step 3):
2B- and fill the data on the popup
3- On the 'Overview' screen, select "Add Firebase to your Web App" (or skip to step 4, if previously added)
3B- Just dismiss the resulting popup:
4- Go to the Project Settings page:
5- And finally to the "Cloud Messaging" tab. Your "(GCM) Sender Id" and the "Server (API) Key" are there:
Android: Should the GCM SENDER_ID be kept secret?
Shouldn't it be kept secret ?
No, it's not required to keep it secret. If anyone decompile your APK and find anyhow your sender ID then hacker cant do anything.
Because to push GCM notification it's required to have API key of Server which is available to owner only.
Related Topics
How to List All Files and Folders Locating on Sd Card
Android Tablayout Android Design
Mobile Chrome Fires Resize Event on Scroll
Change Background of Edittext's Error Message
Camera Preview Is in Portrait Mode But Image Captured Is Rotated
Remove Unwanted White Space in Webview Android
Rotating Image. Animation List or Animated Rotate? (Android)
Sethinttextcolor() in Edittext
Converting from Glsurfaceview to Textureview (Via Gltextureview)
Android - Creating a New Activity in Eclipse
Android: Turn Off Screen When Close to Face
How to Create an Android Spinner as a Popup
Should The Call to The Superclass Method Be The First Statement
Shouldoverrideurlloading in Webview for Android Not Running
How to Kill All Running Applications in Android