Home » Android » Adding deep links in my game app

Adding deep links in my game app

Posted by: admin November 1, 2017 Leave a comment

Questions:

To include my app in the google search result I came to know that I need add “android.intent.action.VIEW”. I have read the example from the link
https://developer.android.com/training/app-links/deep-linking.html

My app is a game app which does not have a https address. What I need to do for android game app ? Please suggest the changes needed in the below example which suits for an android game app which does not have any website.

<activity
android:name="com.example.android.GizmosActivity"
android:label="@string/title_gizmos" >
<intent-filter android:label="@string/filter_view_http_gizmos">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
    <data android:scheme="http"
          android:host="www.example.com"
          android:pathPrefix="/gizmos" />
    <!-- note that the leading "/" is required for pathPrefix-->
</intent-filter>
<intent-filter android:label="@string/filter_view_example_gizmos">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <!-- Accepts URIs that begin with "example://gizmos” -->
    <data android:scheme="example"
          android:host="gizmos" />
</intent-filter>

Answers: