0

I want to show the user geo location on Android:

navigator.geolocation.getCurrentPosition

It doesn't work on Android, I read on the web that I need to allow permissions in the file AndroidMainfest.xml like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.sample.someapp"
      android:versionCode="1"
      android:versionName="1.0">
 <uses-permission android:name="android.permission.INTERNET"></uses-permission>
 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>

But this is related only for an Android app, not a mobile site. What should I do? I tried adding the file like that:

<xml id="equipdet"  src="AndroidMainfest.xml" async="false"></xml>

It's not working

Renjith
  • 5,783
  • 9
  • 31
  • 42

1 Answers1

0

Permissions in AndroidManifest are for Android apps, they are not related to mobile sites a user is visiting with a browser. Take a look at this detailed answer https://stackoverflow.com/a/3885172/1224600

Community
  • 1
  • 1
Y2i
  • 3,748
  • 2
  • 28
  • 32
  • i see no solution there. my code is working fine on regular pc browsers (IE, chrome, firefox). but not on android browser. any suggestions ? – user2440873 Jun 06 '13 at 05:18
  • Try modifying Android Location settings (Settings->Location access) and Chrome Location settings (Chrome->Settings->Content Settings->Google location settings) – Y2i Jun 06 '13 at 05:26
  • i have found my solution with google map jquery mobile. see here http://stackoverflow.com/questions/13345479/clean-example-of-directions-with-google-maps-in-jquery-mobile – user2440873 Jun 06 '13 at 12:54