0

I need a link (eg:http://www.google.com) to open my app directly from google advertisement. Whenever people click on my advertisement in google search results my android app should open.

3 Answers3

0

define an intent filter with data tag and action (ACTION_VIEW) in Manifest's declaration for your Launcher Activity.

and then use that link in your website.

When clicked intent will be resolved by Android System to launch your app.

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

Napolean
  • 3,988
  • 2
  • 24
  • 31
0

Declare this as a child of your launcher activity in the manifest:

<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>

If your the site was say google.com (the host), if someone clicks on the link to open google.com, they will be presented with an option to choose the application they would like to open it with. You can read up on this here and in-depth here

Community
  • 1
  • 1
Ojonugwa Jude Ochalifu
  • 23,935
  • 25
  • 104
  • 122
0

the target activity can be called from a browser only when it has this category filter: android.intent.category.BROWSABLE

Swing
  • 830
  • 1
  • 8
  • 17