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

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

本文整理了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

  1. private void onGeolocationPermissionsShowPromptInternal(String origin, GeolocationPermissionsCallback callback) {
  2. if (mPermissionInterceptor != null) {
  3. if (mPermissionInterceptor.intercept(this.mWebView.getUrl(), AgentWebX5Permissions.LOCATION, "location")) {
  4. callback.invoke(origin, false, false);
  5. return;
  6. }
  7. }
  8. Activity mActivity = mActivityWeakReference.get();
  9. if (mActivity == null) {
  10. callback.invoke(origin, false, false);
  11. return;
  12. }
  13. List<String> deniedPermissions = null;
  14. if ((deniedPermissions = AgentWebX5Utils.getDeniedPermissions(mActivity, AgentWebX5Permissions.LOCATION)).isEmpty()) {
  15. callback.invoke(origin, true, false);
  16. } else {
  17. ActionActivity.Action mAction = ActionActivity.Action.createPermissionsAction(deniedPermissions.toArray(new String[]{}));
  18. mAction.setFromIntention(FROM_CODE_INTENTION_LOCATION);
  19. ActionActivity.setPermissionListener(mPermissionListener);
  20. this.mCallback = callback;
  21. this.origin = origin;
  22. ActionActivity.start(mActivity, mAction);
  23. }
  24. }

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

  1. return true;
  2. case R.id.welfare_share:
  3. ShareUtils.getInstance().shareText(this, mWebView.getTitle(), mWebView.getUrl());
  4. return true;
  5. case R.id.welfare_copy_url:
  6. AppUtils.copyText(this, mWebView.getUrl());
  7. ToastUtils.showToast(R.string.tip_copy_success);
  8. return true;
  9. return true;
  10. case R.id.welfare_browser:
  11. openBrowser(mWebView.getUrl());
  12. return true;
  13. default:

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

  1. private void onCameraAction() {
  2. if (mActivity == null)
  3. return;
  4. if (mPermissionInterceptor != null) {
  5. if (mPermissionInterceptor.intercept(FileUpLoadChooserImpl.this.mWebView.getUrl(), AgentWebX5Permissions.CAMERA, "camera")) {
  6. cancel();
  7. return;
  8. }
  9. }
  10. ActionActivity.Action mAction = new ActionActivity.Action();
  11. List<String> deniedPermissions = null;
  12. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !(deniedPermissions = checkNeedPermission()).isEmpty()) {
  13. mAction.setAction(ActionActivity.Action.ACTION_PERMISSION);
  14. mAction.setPermissions(deniedPermissions.toArray(new String[]{}));
  15. mAction.setFromIntention(FROM_INTENTION_CODE >> 3);
  16. ActionActivity.setPermissionListener(this.mPermissionListener);
  17. ActionActivity.start(mActivity, mAction);
  18. } else {
  19. openCameraAction();
  20. }
  21. }

相关文章