0

I have forked an Android application on Github (https://github.com/android/location-samples/tree/master/BasicLocation) which demonstrates use of Google Play services Location API to get the last known location for a device.

However, when I try and run the application, I receive a Toast message that states "No location detected. Make sure location is enabled on the device."

enter image description here

I have added the following permissions to the Manifest:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

In addition, the Extended controls of the emulator reads my current lat/long coordinates

enter image description here

I was wondering how I can resolve this issue.

1 Answers1

-1

Run the google map app and give it all the permissions and after the map show start your app. check this one for more inf. Emulator's Location simulation not working