Android Parse Push notification device registration only one time on one device

前端 未结 7 2031
礼貌的吻别
礼貌的吻别 2020-12-04 19:07

Every one I am using the parse service for push notification in my app. but it register all time when i re-install the app in one device.Then problem is that,one device rece

7条回答
  •  无人及你
    2020-12-04 19:29

    I got it after update the table with the send of unique id of the android device.

     String  android_id = Secure.getString(getApplicationContext().getContentResolver(),Secure.ANDROID_ID);         
        Log.e("LOG","android id >>" + android_id);
    
        PushService.setDefaultPushCallback(this, MainActivity.class);
    
        ParseInstallation installation = ParseInstallation.getCurrentInstallation();
        installation.put("installationId",android_id);
    
        installation.saveInBackground();
    

    It will update the raw ,but it doesn't re-register the device .

提交回复
热议问题