Hi all,
I need a push in the right direction.
I already have a Service named 'DeviceLocation' that when called will pick the devices location and write the details to a remote server.
Now I would like to run this service named 'DeviceLocation' ie fetching the location details and updating the remote server every 30 minutes.
What is the best way to move forward. I searched the forums, but I find lot of scattered information, some are outdated and not relevant as of now for eg. Sticky service which is outdated, some discussions about PhoneWake partial lock or else the the service will not be called if the device is sleeping etc etc
Can I use a timer in Starter Service to call a service named 'DeviceLocation' every 30 minutes. ? Is it guaranteed that if the DATA and LOCATION in the device is ON, then it will will send the device's location to the remote server for sure ? Do I need to use PhoneWake partial lock ? If yes at which point ? Should I use PhoneWake partial lock inside the service 'DeviceLocation' ?
Any simple sample that shows how to call a service every 30 minutes and also the trick that ensure that the service 'DeviceLocation' will be called even when the device is sleeping. I believe that this may be useful for many others in this forum. I expect the app to run perfectly from Android ver 4.1 onward to the latest
I need an advice.
Thanks in advance
I need a push in the right direction.
I already have a Service named 'DeviceLocation' that when called will pick the devices location and write the details to a remote server.
Now I would like to run this service named 'DeviceLocation' ie fetching the location details and updating the remote server every 30 minutes.
What is the best way to move forward. I searched the forums, but I find lot of scattered information, some are outdated and not relevant as of now for eg. Sticky service which is outdated, some discussions about PhoneWake partial lock or else the the service will not be called if the device is sleeping etc etc
Can I use a timer in Starter Service to call a service named 'DeviceLocation' every 30 minutes. ? Is it guaranteed that if the DATA and LOCATION in the device is ON, then it will will send the device's location to the remote server for sure ? Do I need to use PhoneWake partial lock ? If yes at which point ? Should I use PhoneWake partial lock inside the service 'DeviceLocation' ?
Any simple sample that shows how to call a service every 30 minutes and also the trick that ensure that the service 'DeviceLocation' will be called even when the device is sleeping. I believe that this may be useful for many others in this forum. I expect the app to run perfectly from Android ver 4.1 onward to the latest
I need an advice.
Thanks in advance