PHP和JS - 如果Android应用程序已经安装使用移动网页在设备上检测 [英] Detect if Android app has been installed on the device using a mobile web page - PHP and JS
问题描述
我有这样和类似的东西的要求已经由Android的坑应用商店实现的。
I have a requirement like this and something similar to that has been implemented by Android Pit app-store.
我需要检查,如果Android应用程序已经安装使用移动网页(PHP和JS)在设备上,如果安装启动应用程序,立即。
I need to check if the Android app has been installed on the device using a mobile web page (PHP and JS), and if installed launch the app immediately.
这些都是使用Android的坑中间页。
These are the intermediate pages used by Android pit.
当应用程序未安装 - <一个href="http://www.androidpit.com/en/android/market/app-center-mobile?pname=com.ocito.laredoute">http://www.androidpit.com/en/android/market/app-center-mobile?pname=com.ocito.laredoute
当应用程序已被安装 - <一个href="http://www.androidpit.com/en/qrdl/com.mobage.ww.a692.Bahamut_Android">http://www.androidpit.com/en/qrdl/com.mobage.ww.a692.Bahamut_Android
有谁知道如何实现这一点。请帮忙
Does anyone know how to implement this. Please help
推荐答案
幸运的是,这是不可能的,因为很明显隐私的原因。
Fortunately, this is not possible, for obvious privacy reasons.
这是你能做的最接近的是在应用程序中,有一个℃的活动,意图滤光器&gt;
对于一些URL结构,并在一个链接移动Web站点匹配的URL。
The closest that you can do is in the application, have an activity that has an <intent-filter>
for some URL structure, and have a link in the mobile Web site to a matching URL.
如果用户点击该链接,并在安装应用程序,该活动是为用户选择器选择。
If the user clicks the link and the app is installed, the activity will be a chooser option for the user.
如果用户点击该链接,并没有安装该应用程序,或者他们选择坚持与选择器的Web浏览器,无论网页存在于将被显示的URL(例如,如何下载该应用程序的说明)
If the user clicks the link and the app is not installed, or they choose to stick with their Web browser from the chooser, whatever Web page exists at that URL will be displayed (E.g., instructions of how to download the app).
这篇关于PHP和JS - 如果Android应用程序已经安装使用移动网页在设备上检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!