我正在编写一个任务列表并拥有Project对象,它包含所有任务(和元数据).我使用操作日志,因此当任务更改时我不会立即将其保存到数据库,只需将其保存在内存中以在活动结束时转储到数据库中.Activity的onDestroy方法是最好的地方:如果没有调用onRetainNonConfigurationInstance方法,我启动服务来保存项目(一个实例存储在Application中).节省成本:在DB项目中有修改,所以我保存新数据,更改当前版本并删除以前版本的数据.所以我不害怕突然申请停止.
但是,根据我必须的文件do not count on this method being called as a place for saving data.
有没有其他地方可以保存我的数据?
在设备上开始思考很长时间,然后给出:

VirtualBox显示如下信息:

在日志中:
??? 28 00:16:21 [Genymotion] [Debug] Starting player at "/home/nord/Programms/genymotion"
??? 28 00:16:21 [Genymotion Player] [Debug] [ADB] Use Genymotion Android tools: "/home/nord/Programms/genymotion/tools/adb"
??? 28 00:16:21 [Genymotion Player] [Warning] Unable to load translations. Falling back to english
??? 28 00:16:21 [Genymotion Player] [Debug] Proxy configuration: no proxy used
??? 28 00:16:21 [Genymotion Player] [Warning] **** STARTING VIRTUAL DEVICE ****
??? 28 00:16:21 [Genymotion Player] [Warning] Player version: 2.2.0
??? 28 00:16:21 [Genymotion Player] [Debug] Loading "vboxmanage" plugin
??? 28 …Run Code Online (Sandbox Code Playgroud)