0

My app is using a ViewPager with three fragments. The main fragment, when the app launches, will show a Map fragment with devices' current location as a marker and the other two fragments will use the devices' location, to show content. I am running into couple of challenges:

  1. I cannot launch the Map fragment with the marker of devices' current location. I ensured the permissions are granted - also, as I understand displaying the map is independent of permissions; for getting devices' location, you will need permissions and runtime permissions if you are on 6.0 and above. Is my understanding correct?
  2. I am unable to determine the correct mechanism to send the devices' current location to the other two fragments as I swipe over from the Map fragment. I tried using interfaces, bundle, eventbus but neither worked.
Anil Gorthy
  • 869
  • 3
  • 13
  • 30
  • Check this [SO thread](http://stackoverflow.com/questions/19353255/how-to-put-google-maps-v2-on-a-fragment-using-viewpager) with regard to ViewPager and fragments. – ReyAnthonyRenacia Oct 14 '16 at 14:40
  • Thank you for the link but I am looking to launch my app with the current location (not a static location) as a marker much like Google Maps. – Anil Gorthy Oct 14 '16 at 15:37

0 Answers0