解析,推送通知。如何重置安装数据?

时间:2015-08-08 05:40:37

标签: android parse-platform unity3d push-notification

当我第一次在Android上启动我的应用程序时,在Parse App中会创建一个名为“安装”的对象。它包含有关设备的一些信息。

但如果我从Parse App中删除此信息并再次在Android上运行应用程序 - 在Parse App中没有创建任何内容,我的意思是安装对象。

如何解决?如果当前设备不存在,我想在Parse App中创建Installation对象。

1 个答案:

答案 0 :(得分:2)

我遇到了同样的问题,我在Parse仪表板上移除了安装,并且对应用程序的任何其他使用都找不到安装对象,也不会创建。我创建了一个我打电话给创建的新类。您可以执行保存和异常,然后重置然后调用getCurrentInstallation()。这是它对我有用的唯一方式。

package com.parse;

public class Installation extends ParseInstallation {

public static void reset() {
    ParseCurrentInstallationController controller = ParseCorePlugins.getInstance().getCurrentInstallationController();
    controller.clearFromDisk();
    controller.clearFromMemory();
}

}