指定APP頁面配置
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.myapp.com"
android:pathPrefix="/index.html"
android:scheme="http" ?/ >
</intent-filter>
類似于網(wǎng)頁< ?a >Open Application</a>
在指定APP頁面獲取網(wǎng)頁回調(diào)內(nèi)容
讀取數(shù)據(jù)data時
Intent intent = getIntent();
String action = intent.getAction();
if(Intent.ACTION_VIEW.equals(action)){
Uri uri = intent.getData();
if(uri != null){
String data1 = uri.getQueryParameter("data1");
String data2= uri.getQueryParameter("data2");
android.util.Log.v("data1", data1);
android.util.Log.v("data2", data2);
}
}
? ? ?