基于URL打开特定的应用程序 [英] Open specific app based on URL

查看:131
本文介绍了基于URL打开特定的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会想打开一个应用程序,如果该URL

I will like to open an app if the url

例如,如果人打开: http://www.example.com/id=100,我想解析的例子。 COM 并显示相关选项我的应用程序打开它。

for example if the person opens : http://www.example.com/id=100, i would like to parse example.com and show options to open it with my app.

同样的功能使用YouTube上,如果你点击Youtube链接它要么询问你是否喜欢它使用YouTube打开或直接播放YouTube视频

The same functionality is used by youtube, if you click on youtube link it will either ask if you would like to open it using youtube or directly play youtube video

推荐答案

您可以添加的 数据规范 您的意图过滤器要与您的应用程序打开HTTP架构和域。

You can add a data specification to your intent filter with the http schema and the domain you want to open with your app.

<intent-filter ... >
    <data android:scheme="http" android:host="example.com" />
    ...
</intent-filter>

这篇关于基于URL打开特定的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆