I need a Service to Modify a current Android App Build in Android Studio.
The app is used to send some customer information to a server but also send the current location often to track the sellers.
The changes are:
1.- I am using a service to Sync Data, I start the Sync Process every day at certain hour using an Alarm Intent.
I need the same process but changing it to a Sync Adapter, Also all the Alarm Schedule to fire the Sync Process must be checked.
Also , we need a bullet proof sync module, we need the process don't freeze the app. don't crash it, just work on Wifi to save Mobile data and start sync as soon as a Wifi Spot is reached if the process was not done when the Alarm Intent was fired.
2.- We need to report user's location based on these variables (all of them must be in a Parameters section)
a) if the users is the same area (less than X meters from the prior Location) the location won't be reported. Unless the user's remains more than Y mins in the same location then one single location will be reported. X and Y must be user defined in Params.
b) Use the best practices to save battery. This is for this process and the whole solution. we would prefer Google Play services location over the Android Framework location.
c) The precision level (Of the Location) must be user configurable
3.- All the user Location coordinates must be saved on SQLite Database (We already saving it). If the Wifi or Mobile Data service is not available it should be saved on database and synced as soon as a Mobile or Data service is available, we must send the data and delete it as soon as we confirmed that the all the information was sent properly to the server.
4.- The Process that reports the User location to the server will be available in a schedule, for example, we need only a track of the user's location only from Monday thru Friday from 8 AM thru 6 PM. User's location won't be either saved or reported to the server from 6:01 PM - 7:59 AM Mon-Fri , All the Sunday and all the Saturday.
But these days and hours must be defined at the server, we can decide which user will be reported 7x24 Mon-Sun or in an specific schedule.
Most of these options are already developed but we need the service to test, check, and change the code if needed.