本文整理汇总了Java中com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback类的典型用法代码示例。如果您正苦于以下问题:Java GeolocationPermissionsCallback类的具体用法?Java GeolocationPermissionsCallback怎么用?Java GeolocationPermissionsCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GeolocationPermissionsCallback类属于com.tencent.smtt.export.external.interfaces包,在下文中一共展示了GeolocationPermissionsCallback类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onGeolocationPermissionsShowPrompt
import com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback; //导入依赖的package包/类
@Override
/**
* Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin.
*
* This also checks for the Geolocation Plugin and requests permission from the application to use Geolocation.
*
* @param origin
* @param callback
*/
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissionsCallback callback) {
super.onGeolocationPermissionsShowPrompt(origin, callback);
callback.invoke(origin, true, false);
//Get the plugin, it should be loaded
CordovaPlugin geolocation = parentEngine.pluginManager.getPlugin("Geolocation");
if(geolocation != null && !geolocation.hasPermisssion())
{
geolocation.requestPermissions(0);
}
}
开发者ID:runner525,项目名称:x5webview-cordova-plugin,代码行数:21,代码来源:X5WebChromeClient.java
示例2: onGeolocationPermissionsShowPrompt
import com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback; //导入依赖的package包/类
@Override
/**
* Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin.
*
* This also checks for the Geolocation Plugin and requests permission from the application to use Geolocation.
*
* @param origin
* @param callback
*/
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissionsCallback callback) {
super.onGeolocationPermissionsShowPrompt(origin, callback);
callback.invoke(origin, true, false);
//Get the plugin, it should be loaded
CordovaPlugin geolocation = parentEngine.pluginManager.getPlugin("Geolocation");
if (geolocation != null && !geolocation.hasPermisssion()) {
geolocation.requestPermissions(0);
}
}
开发者ID:zsxsoft,项目名称:cordova-plugin-x5-tbs,代码行数:20,代码来源:X5WebChromeClient.java
示例3: createViewInstance
import com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback; //导入依赖的package包/类
@Override
protected WebView createViewInstance(ThemedReactContext reactContext) {
X5WeView webView = new X5WeView(reactContext);
webView.setWebChromeClient(new WebChromeClient() {
@Override
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissionsCallback callback) {
callback.invoke(origin, true, false);
}
});
reactContext.addLifecycleEventListener(webView);
mWebViewConfig.configWebView(webView);
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setDisplayZoomControls(false);
// Fixes broken full-screen modals/galleries due to body height being 0.
webView.setLayoutParams(
new LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.MATCH_PARENT));
if (ReactBuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
}
return webView;
}
开发者ID:shimohq,项目名称:react-native-x5,代码行数:27,代码来源:RNX5WebViewManager.java
示例4: onGeolocationPermissionsShowPrompt
import com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback; //导入依赖的package包/类
@Override
public void onGeolocationPermissionsShowPrompt(String origin,
GeolocationPermissionsCallback callback) {
if (this.mRealWebChromeClient != null){
this.mRealWebChromeClient.onGeolocationPermissionsShowPrompt(origin, callback);
return;
}
super.onGeolocationPermissionsShowPrompt(origin,callback);
}
开发者ID:Justson,项目名称:AgentWebX5,代码行数:11,代码来源:WebChromeClientWrapper.java
示例5: onGeolocationPermissionsShowPrompt
import com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback; //导入依赖的package包/类
@Override
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissionsCallback callback) {
LogUtils.i(TAG, "onGeolocationPermissionsShowPrompt:" + origin + " callback:" + callback);
if (AgentWebX5Utils.isOverriedMethod(mWebChromeClient, "onGeolocationPermissionsShowPrompt", "public void " + ChromePath + ".onGeolocationPermissionsShowPrompt", String.class, GeolocationPermissionsCallback.class)) {
super.onGeolocationPermissionsShowPrompt(origin, callback);
return;
}
onGeolocationPermissionsShowPromptInternal(origin, callback);
}
开发者ID:Justson,项目名称:AgentWebX5,代码行数:11,代码来源:DefaultChromeClient.java
示例6: onGeolocationPermissionsShowPromptInternal
import com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback; //导入依赖的package包/类
private void onGeolocationPermissionsShowPromptInternal(String origin, GeolocationPermissionsCallback callback) {
if (mPermissionInterceptor != null) {
if (mPermissionInterceptor.intercept(this.mWebView.getUrl(), AgentWebX5Permissions.LOCATION, "location")) {
callback.invoke(origin, false, false);
return;
}
}
Activity mActivity = mActivityWeakReference.get();
if (mActivity == null) {
callback.invoke(origin, false, false);
return;
}
List<String> deniedPermissions = null;
if ((deniedPermissions = AgentWebX5Utils.getDeniedPermissions(mActivity, AgentWebX5Permissions.LOCATION)).isEmpty()) {
callback.invoke(origin, true, false);
} else {
ActionActivity.Action mAction = ActionActivity.Action.createPermissionsAction(deniedPermissions.toArray(new String[]{}));
mAction.setFromIntention(FROM_CODE_INTENTION_LOCATION);
ActionActivity.setPermissionListener(mPermissionListener);
this.mCallback = callback;
this.origin = origin;
ActionActivity.start(mActivity, mAction);
}
}
开发者ID:Justson,项目名称:AgentWebX5,代码行数:31,代码来源:DefaultChromeClient.java
示例7: onGeolocationPermissionsShowPrompt
import com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback; //导入依赖的package包/类
/**
* Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin.
*
* This also checks for the Geolocation Plugin and requests permission from the application to use Geolocation.
*
* @param origin
* @param callback
*/
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissionsCallback callback) {
super.onGeolocationPermissionsShowPrompt(origin, callback);
callback.invoke(origin, true, false);
//Get the plugin, it should be loaded
CordovaPlugin geolocation = parentEngine.pluginManager.getPlugin("Geolocation");
if(geolocation != null && !geolocation.hasPermisssion())
{
geolocation.requestPermissions(0);
}
}
开发者ID:jeremyup,项目名称:cordova-plugin-x5-webview,代码行数:20,代码来源:X5WebChromeClient.java
示例8: onGeolocationPermissionsShowPrompt
import com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback; //导入依赖的package包/类
@Override
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissionsCallback geolocationPermissionsCallback) {
}
开发者ID:hjhrq1991,项目名称:JsBridge,代码行数:5,代码来源:WebChromeClientListener.java
示例9: onGeolocationPermissionsShowPrompt
import com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback; //导入依赖的package包/类
void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissionsCallback geolocationPermissionsCallback);
开发者ID:hjhrq1991,项目名称:JsBridge,代码行数:2,代码来源:OnWebChromeClientListener.java
注:本文中的com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论