当前位置: 首页>>代码示例>>Java>>正文


Java PermissionRequest类代码示例

本文整理汇总了Java中android.webkit.PermissionRequest的典型用法代码示例。如果您正苦于以下问题:Java PermissionRequest类的具体用法?Java PermissionRequest怎么用?Java PermissionRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PermissionRequest类属于android.webkit包,在下文中一共展示了PermissionRequest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onPermissionRequest

import android.webkit.PermissionRequest; //导入依赖的package包/类
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
    public void onPermissionRequest(PermissionRequest request) {
//        request.deny();
        if (this.mRealWebChromeClient != null){
            this.mRealWebChromeClient.onPermissionRequest(request);
            return;
        }
        super.onPermissionRequest(request);
    }
 
开发者ID:Justson,项目名称:AgentWeb,代码行数:10,代码来源:WebChromeClientWrapper.java

示例2: onPermissionRequestCanceled

import android.webkit.PermissionRequest; //导入依赖的package包/类
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public void onPermissionRequestCanceled(PermissionRequest request) {

    if (this.mRealWebChromeClient != null){
        this.mRealWebChromeClient.onPermissionRequestCanceled(request);
        return;
    }
    super.onPermissionRequestCanceled(request);
}
 
开发者ID:Justson,项目名称:AgentWeb,代码行数:10,代码来源:WebChromeClientWrapper.java

示例3: onPermissionRequest

import android.webkit.PermissionRequest; //导入依赖的package包/类
@Override
public void onPermissionRequest(PermissionRequest request) {
    super.onPermissionRequest(request);
    if(client != null) {
        if(Build.VERSION.SDK_INT >= 21) {
            client.onPermissionRequest(request);
        }
    }
}
 
开发者ID:yyter,项目名称:SafeWebView,代码行数:10,代码来源:SafeWebView.java

示例4: onPermissionRequestCanceled

import android.webkit.PermissionRequest; //导入依赖的package包/类
@Override
public void onPermissionRequestCanceled(PermissionRequest request) {
    super.onPermissionRequestCanceled(request);
    if(client != null) {
        if(Build.VERSION.SDK_INT >= 21) {
            client.onPermissionRequestCanceled(request);
        }
    }
}
 
开发者ID:yyter,项目名称:SafeWebView,代码行数:10,代码来源:SafeWebView.java

示例5: onCreateView

import android.webkit.PermissionRequest; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_main, container, false);
    mWebRTCWebView = (WebView) rootView.findViewById(R.id.fragment_main_webview);

    setUpWebViewDefaults(mWebRTCWebView);

    mWebRTCWebView.loadUrl("https://apprtc-m.appspot.com/");

    mWebRTCWebView.setWebChromeClient(new WebChromeClient() {

        @Override
        public void onPermissionRequest(final PermissionRequest request) {
            Log.d(TAG, "onPermissionRequest");
            getActivity().runOnUiThread(new Runnable() {
                @TargetApi(Build.VERSION_CODES.L)
                @Override
                public void run() {
                    if(request.getOrigin().toString().equals("https://apprtc-m.appspot.com/")) {
                        request.grant(request.getResources());
                    } else {
                        request.deny();
                    }
                }
            });
        }

    });

    return rootView;
}
 
开发者ID:googlearchive,项目名称:chromium-webview-samples,代码行数:33,代码来源:MainActivity.java

示例6: onPermissionRequest

import android.webkit.PermissionRequest; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void onPermissionRequest(final PermissionRequest request) {
    LOG.d(LOG_TAG, "onPermissionRequest: " + Arrays.toString(request.getResources()));
    request.grant(request.getResources());
}
 
开发者ID:Andy-Ta,项目名称:COB,代码行数:7,代码来源:SystemWebChromeClient.java

示例7: onPermissionRequest

import android.webkit.PermissionRequest; //导入依赖的package包/类
/**
 * We override this here to keep taps on VPAID ads that abuse their power
 *
 * @param request details around the permission request, see {@link PermissionRequest}
 */
@Override
public void onPermissionRequest(PermissionRequest request) {
    if (Build.VERSION.SDK_INT >= 21)
        request.deny();
}
 
开发者ID:Tubitv,项目名称:TubiPlayer,代码行数:11,代码来源:TubiVPAID.java

示例8: onPermissionRequest

import android.webkit.PermissionRequest; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public void onPermissionRequest(final PermissionRequest request) {
    Log.d(LOG_TAG, "onPermissionRequest: " + Arrays.toString(request.getResources()));
    request.grant(request.getResources());
}
 
开发者ID:runner525,项目名称:x5webview-cordova-plugin,代码行数:6,代码来源:X5WebChromeClient.java

示例9: onPermissionRequest

import android.webkit.PermissionRequest; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public void onPermissionRequest(final PermissionRequest request) {
    LOG.d(LOG_TAG, "onPermissionRequest: " + Arrays.toString(request.getResources()));
    request.grant(request.getResources());
}
 
开发者ID:jeremyup,项目名称:cordova-plugin-x5-webview,代码行数:6,代码来源:X5WebChromeClient.java

示例10: onPermissionRequest

import android.webkit.PermissionRequest; //导入依赖的package包/类
@Override
public void onPermissionRequest(PermissionRequest request) {
	super.onPermissionRequest(request);
}
 
开发者ID:fengshihao,项目名称:WebPager,代码行数:5,代码来源:PagerChromeClient.java

示例11: onPermissionRequestCanceled

import android.webkit.PermissionRequest; //导入依赖的package包/类
@Override
public void onPermissionRequestCanceled(PermissionRequest request) {
	super.onPermissionRequestCanceled(request);
}
 
开发者ID:fengshihao,项目名称:WebPager,代码行数:5,代码来源:PagerChromeClient.java

示例12: onPermissionRequest

import android.webkit.PermissionRequest; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public void onPermissionRequest(final PermissionRequest request) {
  Log.d(LOG_TAG, "onPermissionRequest: " + Arrays.toString(request.getResources()));
  request.grant(request.getResources());
}
 
开发者ID:zsxsoft,项目名称:cordova-plugin-x5-tbs,代码行数:6,代码来源:X5WebChromeClient.java

示例13: onPermissionRequest

import android.webkit.PermissionRequest; //导入依赖的package包/类
@Override
public void onPermissionRequest(PermissionRequest request) {
    super.onPermissionRequest(request);
}
 
开发者ID:fendoudebb,项目名称:PlayAndroid,代码行数:5,代码来源:WebViewActivity.java

示例14: onPermissionRequest

import android.webkit.PermissionRequest; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void onPermissionRequest(final PermissionRequest request) {
    Log.d(LOG_TAG, "onPermissionRequest: " + Arrays.toString(request.getResources()));
    request.grant(request.getResources());
}
 
开发者ID:resin-io-playground,项目名称:resin-configurator-client,代码行数:7,代码来源:SystemWebChromeClient.java

示例15: OnPermissionRequest

import android.webkit.PermissionRequest; //导入依赖的package包/类
public OnPermissionRequest(PermissionRequest request) {
  this.request = request;
}
 
开发者ID:satoshun,项目名称:RxWebView,代码行数:4,代码来源:OnPermissionRequest.java


注:本文中的android.webkit.PermissionRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。