开发者

Location-based App prevents Device from Sleep mode

I wrote a location-based app using the LocationManager.addProximityAlert(double l开发者_开发百科atitude, double longitude, float radius, long expiration, PendingIntent intent) function which is perfectly what I want. But after that, on my device (Samsung Galaxy S), the app is shown on top of the battery usage view just after a few hours, having a huge period in "stay awake"-time. Before using that api, I used "requestLocationUpdates(String provider, long minTime, float minDistance, PendingIntent intent)" and the app did not appear in the battery Usage-Stat (at least not that much).

I do not start any service or any other background task/thread.

So why is that? How can I reduce the "Stay awake"-Period ?


As per the documentation the device will try to get a fix every 4 minutes. This must have caused the battery to have a large stay awake time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜