-3

What is the correct way to fix if checking the status of GPS provider throws SecurityException by request permissions in manifest file

1 Answers1

2

In your Manifest add lines below:

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

Please have a look to:

http://developer.android.com/guide/topics/manifest/manifest-intro.html#perms http://developer.android.com/training/articles/security-tips.html#Permissions

To access device features as Camera, GPS, ... you need to request permissions. If permissions is not requested then a SecurityException is thrown.

LaurentY
  • 7,495
  • 3
  • 37
  • 55