views:

829

answers:

2

Hi there,

I am trying to use gwt-mobile-webkit, particularly its location api. It works well with iPhone (both device and simulator) and Firefox and on G1 with 1.6 Android, however, it does not work on G2 with Android 1.5 on it. In result I am getting onFailure callback with Permission Denied error.

So it seems, that there is some geolocation API (gears or HTML5) in the browser available, but it just does not want to ask user for granting permissions.

Do you know if there is any workaround or just enable it somewhere in settings?

+1  A: 

Hi - I had what sounds like a similar problem on G1. The fix for me was to do Factory Reset - a bit extreme, but it was the only solution I had at the time.

See http://groups.google.co.uk/group/android-discuss/browse_thread/thread/f9233991a1affbd5/3b318c6bed932790

Kevin
A: 

I guess you have read the gears doc here on geolocation (android section):

http://code.google.com/p/geo-location-javascript/wiki/SupportedPlatforms#Google_Gears

Interesting that it says the permission is only asked once per site (see excerpt below).

"Gears is a javascript framework available for Android, Windows Mobile (IE Mobile, Opera Mobile), Mac (Firefox, Safari), Linux and Windows . One of its cores is the Geolocation API. On the mobile phone it asks the user once for permission per site and user, so not every session as in the iPhone OS 3.0."

I would try clearing the android browser cache and then re-visit the site to hopefully cause it to ask permission to enable geo location. - just a guess.

I know the support was flaky at best in 1.5 android.

DEzra
Hi DEzra - I tried this approach too, but it didn't fix the problem - hence the need to do the factory reset. As you say, support was flaky in 1.5.
Kevin