Hi I am trying to load a webview that uses javascript and html5. However, I still can't access the location inside the application. I have searched through the site and found some suggestions but I am still unable to access the location. Here is my code snippet
private void openWebViewTab(){
final LinearLayout holderLayout = (LinearLayout)findViewById(R.id.home_holder);
final View myHolderView = View.inflate(MyWebViewActivity.this, R.layout.my_webview, null);
final WebView myWebView = (WebView) myHolderView.findViewById(R.id.webview);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.getSettings().setGeolocationEnabled(true);
myWebView.setWebViewClient(new MyWebViewClient());
myWebView.loadUrl(url);
}
private class MyWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url){
view.loadUrl(url);
return true;
}
}
here is my Manifestfile:
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission
android:name="android.permission.INTERNET" />
Thanks in Advance for your help Switch