简体   繁体   中英

Android background service stop when app data cleared from device

Iam与android后台服务一起使用,每隔30分钟就会有警报意图致电服务。当我从设备中清除应用程序数据,服务停止并且无法正常工作时,有什么解决方案吗?

When you clear the data for an app from the device setting, the app is force closed and all related Activity , Service and jobs get stopped. Clearing the data will remove any user data, databases, etc including things like account settings, persistent preferences, etc.

The next time you open the app, it is fresh and behaves in the same way it would have done if it was opened for the first time. Clearing the data should revert the application back to it's state as it was when you first installed it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM