In my project I need to :
- Get the User Location(Lat and Long).
- Send it to my API.
- Receive the response.
All this between 15 seconds. I already know how to do those things but it has to be on background. I was using JobSchedule which is perfect and it handles everything, Connection, Network State, and time, but the problem is, it's not compatible with old versions > 21!
The best approach would be GCMNetworkManager under these conditions(Background request and Location)? Thanks!
This is how you do it:
Service:
And In your Activity: