直接从谷歌广告打开Android应用程序

时间:2015-05-06 06:41:31

标签: android

我需要一个链接(例如:http://www.google.com)才能直接从Google广告中打开我的应用。每当人们在谷歌搜索结果中点击我的广告时,我的Android应用程序就应该打开。

3 个答案:

答案 0 :(得分:0)

在Manifest的Launcher活动声明中定义一个带有数据标记和操作(ACTION_VIEW)的intent过滤器。

然后在您的网站中使用该链接。

Android系统将解决点击后的意图,以启动您的应用。

https://developer.android.com/training/app-indexing/deep-linking.html

答案 1 :(得分:0)

将此声明为清单中启动器活动的子项:

<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="my_scheme" android:host="my_host" />
</intent-filter>

如果您的网站是google.com(主持人),如果有人点击链接打开google.com,系统会向他们提供选项,让他们选择要打开的应用。 您可以阅读here并深入了解here

答案 2 :(得分:0)

目标活动只有在具有此类别过滤器时才能从浏览器调用: 的 android.intent.category.BROWSABLE