国产成人毛片视频|星空传媒久草视频|欧美激情草久视频|久久久久女女|久操超碰在线播放|亚洲强奸一区二区|五月天丁香社区在线|色婷婷成人丁香网|午夜欧美6666|纯肉无码91视频

安卓開發(fā)之webview生成快捷方式 androidwebview怎么授權(quán)?

androidwebview怎么授權(quán)?參考如下內(nèi)容:Android授權(quán)訪問網(wǎng)頁的實現(xiàn)方法,即使用Webview顯示OAuth Version 2.a ImplicitGrant授權(quán)的頁,但是對于移動終

androidwebview怎么授權(quán)?

參考如下內(nèi)容:

Android授權(quán)訪問網(wǎng)頁的實現(xiàn)方法,即使用Webview顯示OAuth Version 2.a ImplicitGrant授權(quán)的頁,但是對于移動終端不建議使用Authorize code grant授權(quán)。

具體功能代碼如下所示:

import ;

import ;

import ;

import ;

import ;

import android.os.Bundle;

import android.util.Log;

import ;

import android.webkit.WebSettings;

import android.webkit.WebView;

import android.webkit.WebViewClient;

import ;

import ;

/**

* 使用Webview顯示OAuth Version 2.a ImplicitGrant授權(quán)的頁

* (移動終端不建議使用Authorize code grant授權(quán)

* 本類使用方法

* 調(diào)用本類的地方請?zhí)砑尤缦麓a

* //請將OAuthV2Activity改為類的類名

* Intent intent new Intent(, );

* intent.putExtra(oauth, oAuth); //oAuth為OAuthV2類的實例,存放授權(quán)相關(guān)信

* startActivityForResult(intent, myRrequestCode); //請設(shè)置合適的requsetCode

* 重寫接收回調(diào)信息的方

* if (requestCodemyRrequestCode) { //對應(yīng)之前設(shè)置的的myRequsetCode

* if (resultCode_CODE) {

* //取得返回的OAuthV2類實例oAuth

* oAuth(OAuthV2) ().getSerializable(oauth);

* }

* }

* @see #onActivityResult(int requestCode, int resultCode, Intent data)

*/

public class MyWebView extends Activity {

public final static int RESULT_CODE 2;

private OAuthV2 oAuth;

private final String TAG MyWebView;

private WebView mWebView;

@SuppressLint(NewApi)

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(_);

mWebView (WebView) findViewById(_mywebview);;

(false);

(false);

Intent intent ();

oAuth (OAuthV2) ().getSerializable(oauth);

String urlStr (oAuth);

WebSettings webSettings ();

(true);

(true);

();

mWebView.loadUrl(urlStr);

(());

Log.i(TAG, WebView Starting....);

WebViewClient client new WebViewClient() {

/* 回調(diào)方法,當(dāng)頁面加載時執(zhí)行*/

@Override

public void onPageStarted(WebView view, String url, Bitmap favicon) {

Log.i(TAG, WebView onPageStarted...);

Log.i(TAG, URL url);

if ((access_token) ! -1) {

int start(access_token);

String responseData(start);

(responseData, oAuth);

Intent intent new Intent();

intent.putExtra(oauth, oAuth);

setResult(RESULT_CODE, intent);

finish();

}

super.onPageStarted(view, url, favicon);

Log.i(TAG, 999999999);

}

/* TODO Android2.2及以上版本才能使用該方法,目前

中存在http資源會引起sslerror,待網(wǎng)站修正后可去掉該方*/

public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

if ((null ! ()) (().startsWith(

))) { ();// 接受證書 } else { (); // 默認的處理,WebView變成空白 } // handleMessage(Message msg); 其他處理 } }; (client); }

安卓system webview是什么意思?

1.安卓app中用于顯示網(wǎng)頁內(nèi)容的組件,更不更新無所謂別卸載了就行;

2.它是chrome看視頻以及一些視覺元素會用到;

3.千萬別刪,這個程序刪除以后手機上的瀏覽器打開就會停止。