7 push notifications on device instead of 1

2019-07-16 00:13发布

enter image description here enter image description here

As you can see from these images, it makes 7 notifications. I do not want this. Here is my code:

public class Application extends android.app.Application {


    public Application() {
    }

    @Override
    public void onCreate() {
        super.onCreate();
        Parse.setLogLevel(Parse.LOG_LEVEL_VERBOSE);

        // Initialize the Parse SDK.
        Parse.initialize(this, "yovKfUASIkl14OmRLMT5sXSJvrySDoS8MLwJ7pAA", "mnVmfBTnSzYneOxuf3jUiRKNs9P53ipsdkSwt5dq");


        // Specify an Activity to handle all pushes by default.

        PushService.setDefaultPushCallback(this, SplashActivity.class);
        ParseInstallation.getCurrentInstallation().saveInBackground();
    }
}

1条回答
Emotional °昔
2楼-- · 2019-07-16 00:19

There is a known bug in Parse Android where duplicate installation objects are created when the app is re-installed on the same device. As a result, you see duplicate push notifications on the same device.

You can subscribe to the bug updates here, https://developers.facebook.com/bugs/1520221558200050/

查看更多
登录 后发表回答