Get devices token?

Philip picture Philip · Mar 28, 2014 · Viewed 29.8k times · Source

I'm trying to get the token of my device. Thought this:

ParseInstallation parseInstallation = new ParseInstallation();
    String deviceToken = (String) parseInstallation.get("deviceToken");

would do the trick, but it doesnt, it returns null. Why?

Answer

Gene picture Gene · Mar 31, 2015

Read this. Hope this helps.

http://android-developers.blogspot.be/2011/03/identifying-app-installations.html

OR

String android_id = Settings.Secure.getString(getApplicationContext().getContentResolver(),
                Settings.Secure.ANDROID_ID);

OR

You can try getting the UUID or IMEI.

OR

If you're on the Parse Developer Console: enter image description here