1

我有一个函数,它会在您关闭应用程序或从最近的任务中删除它之前被调用。为了创建自定义事件,我使用 Fabric 的CustomEvent.

我正在从应用程序处于前台的其他屏幕获取事件,但即使在关闭应用程序之前我也没有收到任何事件。

clearApplicationData()在应用程序关闭之前被调用。

请参考以下代码:

public void clearApplicationData(Context context, String clearedFrom) 
{

    Answers.getInstance().logCustom(new CustomEvent("CLEAR_EVENT")
            .putCustomAttribute("Data cleared from", clearedFrom));
}

可能是什么问题?

4

0 回答 0