Medium Feed

 

Monday, December 28, 2015

Application does not have sufficient geolocation permissions error - Cordova android hybrid app developement

Application does not have sufficient Geolocation permissions error  - Cordova android hybrid app development

I was getting this error while try to run my geolocation code in andorid device.

The reason was location access permission for the app is not enabled to app manifest.

Here's how to add the permission:

open your android manifest. xml file:

it will be in the location  : platforms\android\

and the below tag:
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />

Then rebuild the app and run it .

It should work. !!!