Android GoogleMaps myLocation Permission

后端 未结 5 1074
灰色年华
灰色年华 2021-01-17 16:25

With the more recent version of Android... you are supposed to check if the user has given you permission before you use their location info. I\'ve gone through the android

5条回答
  •  逝去的感伤
    2021-01-17 17:02

    HERE WAS THE PROBLEM: Android Emulator

    Scroll down to "Working with the Extended Controls, Settings, and Help".
    Long story short: IF YOU ARE USING AN EMULATOR, YOU HAVE TO FAKE YOUR LOCATION DATA!!!!! The emulator doesn't support wifi (or as far as I can tell, GPS data either).

    Click on your "phone" (your emulator) to make sure it's selected, and press ctrl+shift+L Type in any location you want and click "Send" and viola... you'll have a location. I knew something was up when GoogleMaps on my emulator wasn't even working. I would search for directions and it would say "Waiting for Location" and nothing would happen.

    Good freaking riddance.

提交回复
热议问题