Android点击链接跳转到指定APP页面

指定APP页面配置


android:host="www.myapp.com"

android:pathPrefix="/index.html"

android:scheme="http"  / >


类似于网页<  a href="http://www.myapp.com/index.html?data1=123&data2=456">Open Application


在指定APP页面获取网页回调内容

读取数据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);

}

}

     

你可能感兴趣的:(Android点击链接跳转到指定APP页面)