在装置7推送通知,而不是1 [英] 7 push notifications on device instead of 1
本文介绍了在装置7推送通知,而不是1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你可以从这些图片看,这让7通知。我不想要这个。这里是我的code:
公共类应用扩展android.app.Application {
公共应用程序(){
} @覆盖
公共无效的onCreate(){
super.onCreate();
Parse.setLogLevel(Parse.LOG_LEVEL_VERBOSE); //初始化解析SDK。
Parse.initialize(这一点,yovKfUASIkl14OmRLMT5sXSJvrySDoS8MLwJ7pAA,mnVmfBTnSzYneOxuf3jUiRKNs9P53ipsdkSwt5dq);
//指定一个活动默认来处理所有推。 PushService.setDefaultPushCallback(这一点,SplashActivity.class);
。ParseInstallation.getCurrentInstallation()saveInBackground();
}
}
解决方案
有在解析Android的一个已知的错误在哪里,当应用程序在同一台设备上重新安装了创建重复的安装对象。其结果是,你看到在同一设备上重复推送通知。
您可以订阅错误更新这里,
https://developers.facebook.com/bugs/1520221558200050/
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();
}
}
解决方案
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/
这篇关于在装置7推送通知,而不是1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文