Using gwt-mobile in a gwt + webview application

120 views
Skip to first unread message

jsmanrique

unread,
Apr 8, 2010, 10:57:51 AM4/8/10
to gwt-mobile-webkit-users
Hello,

I am doing some tests trying to get a simple (gwt + webview) app
running in a 2.1 Android device.

Using HelloGeolocation example, from an external webserver (loading it
in the browser), I get the coordinates right. But, when I try to load
it from a webview component, it gets in "Obtaining position..." but no
timeout appears.

How have I done it?

1) Copy hellogeolocation war content (except web-inf) in assets folder
of an android projec
2) The main code to load the .html file is:
mWebView = (WebView) findViewById(R.id.webview);

WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setGeolocationEnabled(true);
webSettings.setSavePassword(true);
webSettings.setSaveFormData(true);

mWebView.loadUrl("file:///android_asset/HelloGeolocation.html");

3) Indicate required permissions in manifest file:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"/>

Why could it be failing? Next steps will be testing database and
storage support.

Thanks and best regards,
---
J. Manrique

Reply all
Reply to author
Forward
0 new messages