We have a problem with push notification on Android devices, When pushType is gcm and deviceToken be undifined, we can't send notification to these devices. Some our users have this problem. (about 10%) How we can resolve this problem? (without activing google account)
public class ParseApplication extends Application {
final static String APPLICATION_ID=***
final static String CLIENT_ID=***
@Override
public void onCreate() {
ParseCrashReporting.enable(getApplicationContext());
// Enable Local Datastore.
Parse.enableLocalDatastore(getApplicationContext());
Parse.initialize(getApplicationContext(), APPLICATION_ID, CLIENT_ID);
Log.d("Parse Initialize","Start");
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
// Optionally enable public read access.
// defaultACL.setPublicReadAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
String device_id = Secure.getString(getApplicationContext().getContentResolver(),Secure.ANDROID_ID);
ParseInstallation installation=ParseInstallation.getCurrentInstallation();
installation.put("UniqueId",device_id);
installation.put("apiVersion",android.os.Build.VERSION.SDK_INT);
installation.saveInBackground();
}