WilliWespe
WilliWespe

Reputation: 117

How to allow Phonegap to use geolocation (permission)

I've created a Phonegap App which shows the users current position.

During the simulation of the app everything works fine, but after the compiling it doesn't works no more.

When I install the App on my Smartphone, no permissions are required. So I guess that's the problem. The geolocation plugin can't be used if there are no permissions for it?

So my question is, how to add the permission for geolocation to the config.xml? I've put a link to my config.xml below.

Thank you very much for answering, and best greetings from Germany :-)

The config.xml

Upvotes: 0

Views: 1900

Answers (1)

Younes Zaidi
Younes Zaidi

Reputation: 1190

Add to Manifest in Android :

<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" />

Upvotes: 1

Related Questions