Hi everybody, I am trying to embed a web app which uses google maps JavaScript API and W3C geolocation in a Web View. The applicaion works but it doesn't show any prompt for geolocation permission to the users and I cant' find the problem. Here the AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="it.progettaremappeonline" android:versionCode="1" android:versionName="1.0"> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <application android:icon="@drawable/icon" android:label="@string/ app_name" android:debuggable="true" > <activity android:name=".bottegheActivity" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> And here the java code: package it.progettaremappeonline; import android.app.Activity; import android.os.Bundle; import android.webkit.GeolocationPermissions.Callback; import android.webkit.WebChromeClient; import android.webkit.WebView; public class bottegheActivity extends Activity { WebView webView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); webView = (WebView) findViewById(R.id.webview); webView.setScrollBarStyle(webView.SCROLLBARS_INSIDE_OVERLAY); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setGeolocationDatabasePath("/data/data/"); webView.loadUrl("http://www.progettaremappeonline.it/test/ geolocation2.html"); webView.setWebChromeClient(new WebChromeClient() { public void onGeolocationPermissionsShowPrompt(String origin, android.webkit.GeolocationPermissions.Callback callback) { callback.invoke(origin, true, false); } }); } } Thanks for helping!! Giac -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

