on android app: send intent for PosLink (fixes #437)

This commit is contained in:
leCradle
2013-03-11 20:24:51 +01:00
parent 303b1cc03a
commit d3270f698c
4 changed files with 43 additions and 7 deletions

View File

@ -13,6 +13,7 @@ public class IITC_WebView extends WebView {
private WebSettings settings;
private IITC_WebViewClient webclient;
private IITC_JSInterface js_interface;
// init web view
private void iitc_init(Context c) {
@ -21,6 +22,8 @@ public class IITC_WebView extends WebView {
settings.setDomStorageEnabled(true);
settings.setAllowFileAccess(true);
settings.setGeolocationEnabled(true);
this.js_interface = new IITC_JSInterface(c);
this.addJavascriptInterface(js_interface, "android");
// our webchromeclient should share geolocation with the iitc script
// allow access by default
@ -59,4 +62,8 @@ public class IITC_WebView extends WebView {
return this.webclient;
}
public IITC_JSInterface getJSInterface() {
return this.js_interface;
}
}