public static async Task call_back_process_alldata(string msg, object obj) { DebugTool.Log("call back of all data------" + msg); CommonRet o = (CommonRet)getJsonObj(msg); if (o == null || o.flag == null) { return; } if (o.flag.Equals("1")) { Windows.Storage.ApplicationDataContainer settings = Windows.Storage.ApplicationData.Current.LocalSettings; ApplicationSettings.RemoveSetting(SettingKeys.CLIENT_DATA); ApplicationSettings.RemoveSetting(SettingKeys.EVENT_DATA); //ApplicationSettings.RemoveSetting(SettingKeys.ERROR_DATA); ApplicationSettings.RemoveSetting(SettingKeys.PAGE_INFO); ApplicationSettings.RemoveSetting(SettingKeys.HAS_DATA_TO_SEND); await ApplicationSettings.RemoveSettingFromXmlFileAsync(SettingKeys.CLIENT_DATA); await ApplicationSettings.RemoveSettingFromXmlFileAsync(SettingKeys.EVENT_DATA); //ApplicationSettings.RemoveSettingFromXmlFileAsync(SettingKeys.ERROR_DATA); await ApplicationSettings.RemoveSettingFromXmlFileAsync(SettingKeys.PAGE_INFO); //ApplicationSettings.RemoveSetting(SettingKeys.HAS_DATA_TO_SEND); CrashListener.RemoveErrorLog(); DebugTool.Log("delete file success!"); } }
public static void SetCrashListener(CrashListener listener) { if (CrashLoggerListenerReceiver.TryAttachReceiver()) { SetCrashLoggerListener(); } CrashLoggerListenerReceiver.SetCrashListener(listener); }
public static void call_back_process_alldata(string msg, object obj) { DebugTool.Log("call back of all data------" + msg); CommonRet o = (CommonRet)getJsonObj(msg); if (o == null || o.flag == null) { return; } if (o.flag.Equals("1")) { IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings; if (settings.Contains("clientdata")) { settings.Remove("clientdata"); } if (settings.Contains("eventdata")) { settings.Remove("eventdata"); } if (settings.Contains("errordata")) { settings.Remove("errordata"); } CrashListener.SafeDeleteFile(IsolatedStorageFile.GetUserStoreForApplication()); if (settings.Contains("pageinfo")) { settings.Remove("pageinfo"); } if (settings.Contains("hasDateToSend")) { settings.Remove("hasDateToSend"); } settings.Save(); DebugTool.Log("delete file success!"); } }
//on crash private static void onCrash(object obj, ApplicationUnhandledExceptionEventArgs e) { CrashListener.ReportException(e.ExceptionObject as Exception, ""); }