- 22 Aug 2024
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
How to set up a Deep link in Android?
- Updated On 22 Aug 2024
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Deep link enables you to link content present in your app itself. You can embed a deep link in Whatfix Mobile projects like Walkthrough, Pop-ups, and more inside project elements like buttons, texts, and more. Once the element is clicked, the added deep link page opens.
Setup a Deep Link
You need to set up a deep link in your app's AndroidManifest.xml. Android supports both app://some-page and http://www.app.com/some-page type schemes.
Consider that you have a profile page, and you want to add deep link capability to that, use the following code snippet,
<activity android:name="app.ProifleActivity">
<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="http"
android:host="www.app.com"
android:pathPrefix="/profile" />
<data android:scheme="app"
android:host="profile" />
</intent-filter>
</activity>
Deep Links in Flow Menu
When configuring a Flow Menu (that is, Walkthrough Checklist/Walkthrough Menu), for a particular menu item you can add a deep link. It is better if that menu item of the Flow Menu starts on a different page (not the same as the Flows Menu). With the help of deep link, Whatfix Mobile SDK can go to the required page.
Consider that you want to add a deep link with the Checklist Flow Menu,
Consider that the menu item Create a follow-up task is configured on a different page (not the same as the start screen). To go to the required page, you can add the deep link.
- Click Create a follow-up task.
- In the DEEPLINK section, add your configured deep-link URL.
For example, consider the flow menu starts in the Home Screen and Create a follow up task needs to start from the Create Task Screen. To redirect from Home Screen to Create Task Screen, you can configure a deeplink app://task and add it to the Create a follow up task flow in the Whatfix Mobile Dashboard.
Deep link with Elements
You can go to a particular screen using the Whatfix Mobile Elements with a deep link enabled in the button.
For example, consider you want your end user to be redirected to the offers page when they click the Avail Offer Now button, you can configure a deeplink app://offer-page and add it to the button in the Whatfix Mobile Dashboard.