I am developing an application that is based on GPS/user location.
There is one main activity I called MainController that is managin fragments (replacing them) and also manages bottom tabs (activating selected tab & deactivating others).
In one FragmentList class, I need to sort objects by distance from user and pass them into ArrayAdapter. All I need is now user location, but the most important question is how to request user location, that after navigating to another fragment I could be able to update this location and when it is needed, pass it into fragment (or request from fragment).
Do I need to use Service ? Is there other way to achieve this ? I thought about Application object, but I don’t know if it really can request user locations ?
I am developing an application that is based on GPS/user location. There is one
Share
You call Location API’s in
MainControllerAs for communicating with Fragments, the documentation is pretty clear on how to do it