通过网页的JS代码启动移动APP
来源:互联网 发布:白金数据影评 编辑:程序博客网 时间:2024/04/28 09:15
少扯淡,直接上代码:
<script>function startAPP(){window.location = "**://**.**/**";}function downloadAPP(){window.location = "http://IP/**/**.apk";}</script><style type="text/css">body{background:#D2D460;text-align:center;margin-top:10%}div{width:100%;margin:0 auto;background:#fff;text-align:left;}</style></head><body><?php $var_name = $_GET["isappinstalled"]; if ($var_name=="1"){echo '<img src=images/start.png alt=打开APP onclick=startAPP() ></img>';}else if ($var_name=="0"){echo '<img src=images/download.png alt=打开APP onclick=downloadAPP() ></img>';}else{echo '<img src=images/welcome.png alt=打开APP onclick=startAPP() ></img>';}?></body>
在app里面需要做以下设置(一般是在manifest.xml文件的activity的 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="**" android:host="**.**" android:pathPrefix="/**"> </data></intent-filter>
2 0
- 通过网页的JS代码启动移动APP
- 通过网页的JS代码启动移动APP
- Android通过网页启动APP
- 通过网页来启动APP
- 在网页上启动移动设备APP
- 实现通过网页中的链接启动APP
- 网页通过js打开本地app
- JS 网页中通过js控制图片的左右上下移动
- 网页启动App&网页跳转到App指定的页面
- 怎么通过代码在一个App当中启动另一个App
- 通过Html启动IOS的APP
- 通过openURL的方式启动其它App
- 通过Intent启动其他APP的Activity
- 网页启动APP
- 网页端启动APP
- 通过APP启动另一个App
- 通过网页启动应用程序
- 通过web启动app
- Asp.Net MVC 4 Web API 中的安全认证-使用OAuth
- PHPexcel设置单元格日期格式
- KVM虚拟机配置网桥连接网络
- INSTALL_FAILED_INSUFFICIENT_STORAGE 错误解决
- 俊逸,看似柔弱,却亭亭玉立,
- 通过网页的JS代码启动移动APP
- Dev Express的CheckedListBoxControl全选及遍历方法
- 20140404收盘小结
- Linux进程间通信(三)---管道通信之有名管道及其基础实验
- hdu1005
- [hdu 2006] 求奇数的乘积
- Linux 使用uinput创建虚拟input设备
- 音频编解码·实战篇(1)WAV转至AAC(AAC编码)
- Flex 1152:继承的定义在(命名空间public。。)存在冲突