Android: Deep Link User To Specific Activity

Deep linking a user to a specific activity based off an incoming push parameter is possible via the custom JSON payload and adding an intent filter to your manifest. Read more about deep linking in iOS and Android.

Look for the Custom Data field in the notification builder that allows you to insert JSON objects. In this field, you'll need to pass along the deeplink in the "mp_cta" parameter. This param will generate an Intent with the provided URI (your mp_cta value) when detected by the Mixpanel Receiver.

If you have your intent filter setup correctly for this activity, the push notification should link directly to that activity. For example, the following expects "joeysmusicfinder://Login" as the mp_cta value to link to the Login activity:

            android:theme="@style/AppTheme.NoActionBar" >
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- note that the leading "/" is required for pathPrefix-->
                <!-- Accepts URIs that begin with "joeysmusicfinder://Login” -->
                <data android:scheme="joeysmusicfinder"
                    android:host="Login" />
Find your answer?
1 out of 5 found this helpful



Article is closed for comments.