[英]Parse, Push notifications. How to reset Installation data?
當我第一次在Android中使用Parse App啟動我的應用程序時,將創建一個名稱為-Installation的對象。 它包含有關設備的一些信息。
但是,如果我從Parse App中刪除此信息並再次在Android上運行應用程序-Parse App中未創建任何內容,則表示安裝對象。
如何解決? 如果當前設備不存在安裝對象,我想在Parse App中創建安裝對象。
我遇到了同樣的問題,即刪除了Parse儀表板上的安裝,並以其他方式使用了該應用程序,該應用程序找不到安裝對象,也無法創建。 我創建了一個在create上調用的新類。 您可以進行保存,如果發生異常,則可以進行重置,然后調用getCurrentInstallation()。 這是它為我工作的唯一方法。
package com.parse;
public class Installation extends ParseInstallation {
public static void reset() {
ParseCurrentInstallationController controller = ParseCorePlugins.getInstance().getCurrentInstallationController();
controller.clearFromDisk();
controller.clearFromMemory();
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.