Which is the best way to get continues location updates from running background service with battery optimization?
<p>I have to create an app which runs a service in background and continually update the current location on the server or we can say i have to send my current location at some points. The solutions i have think are following. please look at that and give me some idea.</p>

<ol>
<li>Running an service in background with boot-starter.</li>
<li>Implementation of alarm manager so service can be started automatically if android kills it. </li>
<li>If my current location is in the radius of the 500 from my points than start to update on server.</li>
<li>and other logic which i have think to prevent continues server update.</li>
</ol>

<p>I have research on it and found it consumes much battery of phone. So please suggest me how can i optimized it.</p>
