Android webview html5å°çå®ä½
ææ¥çäºä¸æºç 解å³äºï¼ä¸»è¦ä»£ç å¦ä¸ï¼//å¯ç¨æ°æ®åºwebSettings.setDatabaseEnabled(true);Stringdir=this.getApplicationContext().getDir("database",邮件攻击源码Context.MODE_PRIVATE).getPath();//å¯ç¨å°çå®ä½webSettings.setGeolocationEnabled(true);//设置å®ä½çæ°æ®åºè·¯å¾webSettings.setGeolocationDatabasePath(dir);//æéè¦çæ¹æ³ï¼ä¸å®è¦è®¾ç½®ï¼è¿å°±æ¯åºä¸æ¥ç主è¦åå webSettings.setDomStorageEnabledï¼trueï¼//é ç½®æéï¼åæ ·å¨WebChromeClientä¸å®ç°ï¼publicvoidonGeolocationPermissionsShowPrompt(Stringorigin,GeolocationPermissions.Callbackcallback){ callback.invoke(origin,true,false);super.onGeolocationPermissionsShowPrompt(origin,callback);}é ç½®æéï¼<uses-permissionandroid:name="android.permission.ACCESS_FINE_LOCATION"/><uses-permissionandroid:name="android.permission.ACCESS_COARSE_LOCATION"/>
2024-12-28 23:49
2024-12-28 23:06
2024-12-28 22:52
2024-12-28 22:28
2024-12-28 21:53