本文整理匯總了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);
}
示例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);
}
示例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);
}
}
}
示例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);
}
}
}
示例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;
}
示例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());
}
示例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();
}
示例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());
}
示例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());
}
示例10: onPermissionRequest
import android.webkit.PermissionRequest; //導入依賴的package包/類
@Override
public void onPermissionRequest(PermissionRequest request) {
super.onPermissionRequest(request);
}
示例11: onPermissionRequestCanceled
import android.webkit.PermissionRequest; //導入依賴的package包/類
@Override
public void onPermissionRequestCanceled(PermissionRequest request) {
super.onPermissionRequestCanceled(request);
}
示例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());
}
示例13: onPermissionRequest
import android.webkit.PermissionRequest; //導入依賴的package包/類
@Override
public void onPermissionRequest(PermissionRequest request) {
super.onPermissionRequest(request);
}
示例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());
}
示例15: OnPermissionRequest
import android.webkit.PermissionRequest; //導入依賴的package包/類
public OnPermissionRequest(PermissionRequest request) {
this.request = request;
}