网站系统繁忙怎么办,关键词优化,杭州网站建设官网蓝韵网络,广州小程序开发外包老套路先上图#xff1a; 先说下上面的流程#xff0c;第一张图是模拟浏览器的网页点击链接打开app,第二张图系统弹框提示是否打开app,第三张图已打开APP#xff0c;弹出的吐司是打开APP携带的数据
具体实现分为两步#xff0c;第一步配置你要打开的activity页面如下…老套路先上图 先说下上面的流程第一张图是模拟浏览器的网页点击链接打开app,第二张图系统弹框提示是否打开app,第三张图已打开APP弹出的吐司是打开APP携带的数据
具体实现分为两步第一步配置你要打开的activity页面如下 activity android:name.activity.BrowserOpenActivityintent-filteraction android:nameandroid.intent.action.VIEW /category android:nameandroid.intent.category.DEFAULT /category android:nameandroid.intent.category.BROWSABLE /dataandroid:hostxiayiyeandroid:schemeyhsh //intent-filter/activity
第二步打开app的链接
p通过点击下面的打开app按钮可以打开知道的app并且传递参数/p
pa hrefyhsh://xiayiye?namezhangsanage29打开App/a/p
yhsh:代表清单文件里面的scheme
xiayiye:代表host
后面剩下的就是参数跟get请求拼接一样即可 然后看下打开activity后是如何获取到的参数 String action getIntent().getAction();if (action ! null action.equals(Intent.ACTION_VIEW)) {Uri data getIntent().getData();if (data ! null) {String name data.getQueryParameter(name);String age data.getQueryParameter(age);Toast.makeText(this, 名字 name 年龄 age, Toast.LENGTH_LONG).show();}}
任何程序错误以及技术疑问或需要解答的请添加