I am creating an app (Android) with two fragments, one with an address list and another with a map pointing to these addresses. In vertical, they are in tabs sliding and in the horizontal, they are side by side, that is, both are always active.
And both need access to the location. Only at the beginning, but soon at the beginning.
The map uses to centralize the position of the device.
In the list serves as geographic center to limit the suggestions of addresses.
I already have the location in the map pane. I used this lib that works very well and is very simple to use, ie I do not need a guide to find the location.
Just before repeating the formula in the other fragment, I was wondering if there is a better way to do this.
For example, if I knew how to get the location in the activity and move to the fragments, I would not have to repeat it.
Or maybe there is another way. Can you show me?