w3c geolocation working but prompt not showing

by geow » Thu, 19 May 2011 18:44:46 GMT

Sponsored Links
 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" ;
    <uses-permission android:name="android.permission.INTERNET"/>

    <application android:icon="@drawable/icon" android:label="@string/
app_name" android:debuggable="true" >
        <activity android:name=".bottegheActivity"
android:theme="@android:style/Theme.NoTitleBar" >

                <action android:name="android.intent.action.MAIN" />
android:name="android.intent.category.LAUNCHER" />


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;

        public void onCreate(Bundle savedInstanceState) {
        webView = (WebView) findViewById(R.id.webview);
        webView.loadUrl(" http://www.progettaremappeonline.it/test/ 
        webView.setWebChromeClient(new WebChromeClient() {
                 public void onGeolocationPermissionsShowPrompt(String origin,
android.webkit.GeolocationPermissions.Callback callback) {
                    callback.invoke(origin, true, false);


Thanks for helping!!


Other Threads

1. Failure to mount ext3 partition inside init.rc after loadable module

I am trying to mount a formated ext3 partition on actual HW (zoom2 and
  after insmod inside of init.rc but it fails to mount. I tried
  cases such as:
1. I did load module (insmod) followed by mount at user prompt;
   mount was successful.
2. I did load module (insmod) inside of init.rc and mount at user
   again it is successful to mount.
3. Build the driver inside of kernel and do mount inside of init.rc;
   result is successful to mount
4. Try to Load module (insmod) followed by mount inside of init.rc;
   result is failure to mount.

My question is if there is any limitation to that in android
Would anybody have any suggestion to solve the issue of installing
module and mount at "init" section of the android initialization?

2. Listen to Virtual Keyboard events when within an EditText

Hi guys,

this might be a pretty simple question, but I've tried several ways
without finding an answer...

I've set the following properties to the EditText to get the "Smiley"
Button which is used by the MessagingApp:


This works pretty fine... the button is there and it puts a smiley to
the EditText.

BUT: I would like to call my own Smiley Dialog (which is currently
triggered by a button), when this key is pressed!

So I've tried the OnKeyListener() on the EditText...

This method catches the backspace key and everything from 0-9. But it
refuses to catch any other key, so I am not able to get an event when
this "smiley" button is pressed.

Do you guys have any idea, how I could do this?

Thank you very much in advance!!!


3. Trouble using NPN_PluginThreadAsyncCall and NPN_InvokeDefault to call back the browser from a native thread

4. Getting hold of a resource using generated string

5. Who are going to attend Google I/O?

6. Nexus One - Geocoder causes IOException - works perfectly with other devices and emulator

7. End of fling within Gallery