Android: Battery Approach and Battery Alert

I could implement a proximity alert that will use requestSingleUpdate and sleep for a while before requesting another update according to the distance from the desired location.

I would expect the OS to perform this exact behavior in the proximity alert mechanism, but I have not found any documentation about this, and I am afraid to use it as it is, since I need to run my application for a long time and battery saving is crucial.

Do you have any useful knowledge or suggestions?

thanks

+4
source share
1 answer

From Professional Android Sensor Programming . Greg Milette, Adam Stroud: Book screenshot

I, this time, will go with the implementation of the above model: check the current location, sleep according to the distance from the destination, until the current location is close enough.

+1
source

Source: https://habr.com/ru/post/1469195/


All Articles