當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。