0

I am running a background service which checks for some updates from the server every 2 hours in my android app and it works fine so long as the device is the not in the locked state. But once I lock my phone and unlock again I see my device displaying the message that my app has crashed. What could be the real reason behind it. Does it need some permissions to be declared. Could anyone suggest me as to why this is happening.

4

1 回答 1

0

它可能是由多种原因引起的。但我会猜测:您是否考虑到您的应用无法到达服务器的情况?我的意思是,我猜测当您锁定手机或以某种方式关闭手机时,它可能会关闭您的连接,并且您的应用程序可能会崩溃,因为它会在没有连接的情况下获取服务器。它只是一个非常广泛的猜测......

于 2012-06-19T23:06:44.147 回答