0

I'm writing an Android WebView app, and when loading a webpage that require to request user's location, it should ask user's permission.

I follow this post to write this simple app. https://turbomanage.wordpress.com/2012/04/23/how-to-enable-geolocation-in-a-webview-android/

But on my Android 4.4.4 device, it still didn't work. It will not ask user's permission to access user's location.

Anyone has the same problem? or any idea?

Thanks in advance. Eric

1 Answer 1

0

It is not supposed to ask the permission through the webview. Once the AndroidManifest.xml have this line:

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

the user already gave the app the permission to access his location on install.

The code from the link you provided gets the location and do what supposed to without the request dialog that appears on browsers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.