android - Motion detection versus conserving battery -


in app, have service running in background, in time ranges user determines.

in theory, need know user's distance destination. optimizations, i'm implementing own proximity alert, sleeps time frames according current distance.

moreover, if user not in motion @ all, stop locations updates, since know it's not moving. used listener acceleration sensor. leaving on long ranges of time draining battery, since minor updates arrive constantly.

i know increase time frames of locationing (i read great article in android developers..), it's highly risky correctness.

did 1 ever face similar problem? suggest different designing?

thanks help

android kitkat adds new sensor type, type_significant_motion, designed solve problem. if supported, causes motion sensor wake system motion events significant enough cause location change.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -