开发者

Gears or HTML5 Location API on Android 1.5

开发者 https://www.devze.com 2022-12-27 12:06 出处:网络
I am trying to use gwt-mobile-webkit, particularly its location api. It works w开发者_开发百科ell with iPhone (both device and simulator) and Firefox and on G1 with 1.6 Android, however, it does not w

I am trying to use gwt-mobile-webkit, particularly its location api. It works w开发者_开发百科ell 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?


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消