Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get devices token?

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?

like image 224
Philip Avatar asked Dec 25 '22 11:12

Philip


1 Answers

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

like image 138
Gene Avatar answered Dec 28 '22 23:12

Gene