GPS functionality not working when webview is used in android -


i'm trying access gps using google maps, displayed using webview. gps enabled in device , following permissions given:

<uses-permission android:name="android.permission.internet"/>

<uses-permission android:name="android.permission.access_fine_location" />

this code webview part:

storelocator = (webview) findviewbyid(r.id.storelocator);         storelocator.setwebviewclient(new webviewclient());         storelocator.getsettings().setjavascriptenabled(true);         storelocator.getsettings().setgeolocationenabled(true);           // storelocator.getsettings().setbuiltinzoomcontrols(true);         storelocator.setwebchromeclient(new webchromeclient() {             public void onprogresschanged(webview view, int progress) {                 locationdialog.show();                 locationdialog.setprogress(0);                 activity.setprogress(progress * 1000);                  locationdialog.incrementprogressby(progress);                  if (progress == 100 && locationdialog.isshowing())                     locationdialog.dismiss();             }         });         storelocator.loadurl(getresources().getstring(r.string.location)); 

is there listener added sharing of location activated?

added these lines too, didn't work:

  storelocator.setwebchromeclient(new webchromeclient() {              public void ongeolocationpermissionsshowprompt(string origin, geolocationpermissions.callback callback) {                 // log.d("geolocation permission", "permission >>>"+origin);                 callback.invoke(origin, true, false);             }}); 


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -