简体   繁体   English

为Android应用启用深层链接

[英]Enable Deep Linking for an Android app

Recently I built an Android app that consume data through JSON from a back-end. 最近,我构建了一个Android应用,该应用通过后端从JSON消耗数据。 There is no public/front zone, it's only back-end. 没有公共/前端区域,只有后端。 Moreover I built a showcase-website just to let people know the app exists. 此外,我建立了一个展示网站,目的是让人们知道该应用程序的存在。 Back-end and Showcase-Webiste reside at two different URLs. 后端和Showcase-Webiste位于两个不同的URL。 In the developer console I enabled the app indexing and the showcase-website is the one I set. 在开发人员控制台中,我启用了应用程序索引编制,并且我设置的是show-website。

I'd like to add deep linking but I can't figure out how to configure the intent-filter. 我想添加深层链接,但是我不知道如何配置意图过滤器。

For example, suppose my showcase-website URL is this: http://nolimitsworld.com/ 例如,假设我的展示网站网址为: http : //nolimitsworld.com/

How should I configure the data section of the intent-filter? 我应该如何配置意图过滤器的数据部分? the host parameter should be? 主机参数应该是?

The question in your subject line is misleading. 您的主题行中的问题具有误导性。 You do have a public web site, and that's your showcase web site. 您确实有一个公共网站,这就是您的展示网站。 Use that showcase web site for your intent filter. 使用该展示网站来进行意图过滤。 The backend url only gets called from your android app anyway, so no one needs to know that one but you. 无论如何,后端网址只会从您的android应用程序中调用,因此除了您之外,没人需要知道该网址。

If you still need help figuring it out, please remove the api url from your question, and just show us the url to your showcase web site instead (and only register that one with google). 如果您仍然需要帮助找出问题的答案,请从问题中删除api网址,然后仅向我们显示您的展示网站的网址(只能在Google上注册该网址)。

Now if your other concern is that you wish to index your application without going through any web site at all since most people wouldn't recognize the domain name of your web site anyway, then there is actually no need to do deeping linking and app indexing through google. 现在,如果您的另一个担心是您希望完全不访问任何网站就对应用程序进行索引,因为大多数人无论如何都不会识别您的网站的域名,那么实际上就不需要进行深层链接和应用程序索引通过谷歌。

You could just get away with indexing the content of your app with a search provider and launching your app with an explicit intent. 您可以通过与搜索提供程序为应用程序编制索引来建立索引,并以明确的意图启动应用程序。 Google doesn't even need to get involved if you do that. 如果您这样做,Google甚至不需要参与。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM