• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java GeolocationPermissionsCallback类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EvaluationStrategy类代码示例发布时间:2022-05-23
下一篇:
Java RpcNoSuchMethodException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap