点击链接跳到指定的app
2017-02-08 15:53
176 查看
1.首先在app里面MIANACTIVITY追加下面的内容
<activity android:name=".MainNovelActivity" android:resizeableActivity="false" android:screenOrientation="portrait" android:theme="@style/AppTheme.Welcome"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> <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:scheme="hpd"/> </intent-filter> </activity>
然后编辑脚本html
<html><head> <meta charset="utf-8"></head><body> <script> function isInstalled(){var the_href=$(".down_app").attr("href");//获得下载链接window.location="apps custom url schemes";//打开某手机上的某个app应用setTimeout(function(){window.location=the_href;//如果超时就跳转到app下载页},500); } function doCallApp() { window.location="hpd://bid/info?id=20170200019" } </script> <br> <a href="hpd://bid/info?id=20170200019">app link</a> <br> <br> <button id="callApp" onclick="doCallApp()">Call App<tton></body><html>
然后在MAINACTIVITY里面设置跳转到特定界面的方法
Intent i_getvalue = getIntent();String action = i_getvalue.getAction();if(Intent.ACTION_VIEW.equals(action)) {Uri uri = i_getvalue.getData();if (uri != null) {String id = uri.getQueryParameter(8b37"id");Log.d("TAg",id);Intent intent = new Intent();intent.setClass(this, BorrowDetailsActivity.class);intent.putExtra(EXTRA_KEY_2, id);startActivity(intent);}}
相关文章推荐
- 点击外部链接跳转App指定页面SingleTask模式
- iOS实现在webview页面内点击链接,跳转指定App
- iOS实现在webview页面内点击链接,跳转指定App
- Android实现通过浏览器点击链接打开本地应用(APP)并拿到浏览器传递的数据
- android实现通过浏览器点击链接打开本地应用(APP)并拿到浏览器传递的数据
- 如何点击链接直接跳转到app store指定应用下载页面
- extjs 点击链接到另一个页面 并激活另一个页面的指定tab
- ThinkPHP删除指定文件(物理删除) 点击链接可查看详情(对学习可有很大的帮助的
- Android实现通过浏览器点击链接打开本地应用(APP)并拿到浏览器传递的数据(转)
- 点击页面链接跳转到指定位置
- android实现通过浏览器点击链接打开本地应用(APP)并拿到浏览器传递的数据
- ios点击链接直接跳转到 App Store 指定应用下载页面
- 指定当前的页面中的所有链接点击之后以新窗口的形式弹出,而不在当前页面显示链接的东西
- 在页面上点击一个链接,跳转到与指定QQ聊天的功能
- 下拉点击跳到指定链接(类同友情链接)
- .net web 点击链接在页面指定位置显示DIV的问题
- 如何点击链接直接跳转到app store指定应用下载页面
- 如何点击链接直接跳转到app store指定应用下载页面
- ios点击链接直接跳转到 App&n…
- android实现通过浏览器点击链接打开本地应用(APP)并拿到浏览器传递的数据