Web应用程序的链接

Web应用程序的链接

本文介绍了Web应用程序的链接,以打开Android设备已安装的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人得到任何想法如何,我可以在设备上从一个Web应用程序中的链接打开一个安装的应用。我计划建立一个Web应用程序为,将有上有一个测验的Andr​​oid 3.0平板设备。测验会要求用户在设备上使用已安装的应用程序,所以基本上是我需要做的是有一个链接,称扫描QR code,将打开QR code应用在QR codeS进行扫描。任何对此的思考?

Has anyone get any ideas how I could open an installed app on a device from a link inside a web app. I am planning on building a web app for Android 3.0 tablet device that would have a quiz on it. The quiz would require a user to scan in QR Codes using an installed app on the device so essentially what I need to do is have a link saying scan QR Code that would open the QR Code app. Any thoughts on this?

推荐答案

如果在QR code有问题的应用程序是吧code扫描仪的的说明。

If the "QR Code" app in question is Barcode Scanner, they have instructions for how to set up links.

如果有问题的QR code的应用程序是你自己的,你需要建立一个<意向滤光器> 为您的活动是一个类似于酒吧code扫描仪使用:

If the "QR Code" app in question is your own, you will need to set up an <intent-filter> for your activity that is similar to the one Barcode Scanner uses:

  <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="http" android:host="zxing.appspot.com" android:path="/scan"/>
  </intent-filter>

您会替换你控制某一领域的主机。理想情况下,你把网页的主机和路径指示的网址,因此,如果有人点击在Web应用程序中的链接,他们没有安装QR code的应用程序呢,你给他们一个网页,解释自己失去了什么。

You would replace the host with some domain that you control. Ideally, you put a Web page at the URL indicated by the host and path, so that if somebody clicks the link in the Web app and they do not have the "QR Code" app installed, you show them a page that explains what they are missing.

这篇关于Web应用程序的链接,以打开Android设备已安装的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 01:32