0

How can I activate the geolocalisation with childBrowser?

I explain my problems. I would like to go in Doogle map web site with childBrowser to show my position.

The childBrowser show Google map and other website but impossible to show my position in Google map.

I have add the permission in android manifest:

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

But it is not sufficient. I don't understand why.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Agriesean
  • 155
  • 1
  • 16

1 Answers1

0

Geolocation is not enabled by default in the ChildBrowser. You'd need to open the ChildBrowser.java file, go to the showWebPage method then find where the WebSettings are defined. Then add:

settings.setGeolocationEnabled(true);

and you should be good to go.

Simon MacDonald
  • 23,253
  • 5
  • 58
  • 74
  • tank's for your answer but in the moment of I try this, I have the message, "your position could not be determined" with maps.google.ch/ – Agriesean Jan 14 '13 at 09:36
  • Are you on an emulator, if so try a phone. If you are inside try going outside. – Simon MacDonald Jan 14 '13 at 17:41
  • I have test outside with my Samsung Galaxy S3 and Android 4.1.2 and I was the same problems.:-(. In same postion I tested to go with dolphone browser in gmaps and they didn't was problems to geolocalise me. – Agriesean Jan 16 '13 at 13:00
  • Alright, go to the childbrowser repo on github and raise an issue as it sounds like a bug. – Simon MacDonald Jan 16 '13 at 15:51