com.tencent.smtt.sdk.WebView.getUrl()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中com.tencent.smtt.sdk.WebView.getUrl()方法的一些代码示例,展示了WebView.getUrl()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.getUrl()方法的具体详情如下:
包路径:com.tencent.smtt.sdk.WebView
类名称:WebView
方法名:getUrl

WebView.getUrl介绍

暂无

代码示例

代码示例来源:origin: Justson/AgentWebX5

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);
  }
}

代码示例来源:origin: leftcoding/GankLy

return true;
case R.id.welfare_share:
  ShareUtils.getInstance().shareText(this, mWebView.getTitle(), mWebView.getUrl());
  return true;
case R.id.welfare_copy_url:
  AppUtils.copyText(this, mWebView.getUrl());
  ToastUtils.showToast(R.string.tip_copy_success);
  return true;
  return true;
case R.id.welfare_browser:
  openBrowser(mWebView.getUrl());
  return true;
default:

代码示例来源:origin: Justson/AgentWebX5

private void onCameraAction() {
  if (mActivity == null)
    return;
  if (mPermissionInterceptor != null) {
    if (mPermissionInterceptor.intercept(FileUpLoadChooserImpl.this.mWebView.getUrl(), AgentWebX5Permissions.CAMERA, "camera")) {
      cancel();
      return;
    }
  }
  ActionActivity.Action mAction = new ActionActivity.Action();
  List<String> deniedPermissions = null;
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !(deniedPermissions = checkNeedPermission()).isEmpty()) {
    mAction.setAction(ActionActivity.Action.ACTION_PERMISSION);
    mAction.setPermissions(deniedPermissions.toArray(new String[]{}));
    mAction.setFromIntention(FROM_INTENTION_CODE >> 3);
    ActionActivity.setPermissionListener(this.mPermissionListener);
    ActionActivity.start(mActivity, mAction);
  } else {
    openCameraAction();
  }
}

相关文章