问题描述
我有一个严重的问题,可能您已经解决了。 我已经看到,当我们将youtube视频链接发送给任何人时,当某人打开该链接时,该链接将打开该应用程序(youtube应用程序),以防万一他/她已经在其设备或手机上安装了youtube应用程序。
现在,我已经用Google搜索与我们自己创建的应用程序相关的内容。 但是,得到了一些结果。 我想知道应用相同的实际逻辑或代码是什么?
要执行哪些支持的工作?
编辑:
完成如下:
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<data
android:host="zoomvysame.app.link"
android:scheme="https"/>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
和安装应用程序后使用链接: :
1楼
深层链接
从官方
为了使Google能够抓取您的应用程序内容并允许用户从搜索结果中进入您的应用程序,您必须在应用程序清单中添加针对相关活动的意图过滤器。 这些意图过滤器允许您在任何活动中深度链接到内容。
有很多深层链接提供程序,例如
2楼
您正在询问AppIndexing(深层链接)。
应用程序索引允许用户单击移动设备上的链接,如果该应用程序存在于设备中,则将该用户导航到该应用程序,否则可以在具有应用列表的Play商店中导航他。
为了执行AppIndexing,您需要在应用程序的启动活动中定义可接受的URL方案,例如:
<activity... >
<intent-filter>
<data android:host="zoomvysame.app.link" android:scheme="https"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
在上面的示例中,当您单击“ ”之类的链接时,它将启动您的应用程序,而不是浏览器中的打开链接。
和提供了一些有关AppIndexing的解决方案,您可以使用它们的实现获取更多详细信息和对App索引的更多控制。