Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Deep Linking for App in Android

    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 540
    Comment on it

    Deep Linking for App contents means allowing user to enter your app through the search results. For the deep linking to be enabled for your app you must use relevant intent filters in your Android manifest file.
    For Example: Suppose a user is playing game on his Android device, and after playing he shared his score on social network website like Twitter & Facebook. When other social network users click on that shared link, then the app will open if it is installed in his Android device otherwise it will direct the user to play store to download the app.

    How to enable deep linking for Android App

    1) The activity you want to launch from the search results for deep linking, you have to provide intent filters for that Activity in your Android Manifest file.

    2) ACTION: It specifies the action view so that the intent filter can be reached from the search.

    3) DATA: You can use multiple tags, where each tag represents a URI format that redirect to an activity. With android:scheme you can also add other attributes to refine the URI format and your search results, like android:path, android:host.

    4) CATEGORY: You have to define two categories. One is DEFAULT & another is BROWSABLE. DEFAULT is used when you want a link on web page to point to your website and if you want a link to resolve to your app you have to use BROWSABLE that let a intent to be executable from web browser.

    NOTE: To make your app indexing work, you should use minSdkVersion 17 or lower.

    Below is the example that allows user to enter the app using intent:

    <activity android:name="com.example.android.XyzActivity"
    android:label="@string/title_xyz">
    <intent-filter android:label="@string/filter_title_viewxyz">
    <action android:name="android.intent.action.VIEW">
    <data android:scheme="http"
    android:host="example.com"
    android:pathPrefix="/xyz">
    <category android:name="android.intent.category.DEFAULT">
    <category android:name="android.intent.category.BROWSABLE">
    </intent-filter>
    </activity>
    

 1 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: