Skip to main content
SDK Version

Deep Links

Deep links enable your application to open specific screens or content directly from notifications, web pages, or external sources. By integrating deep links, you can guide users to precise destinations within your app — enhancing engagement and creating seamless navigation between notifications, campaigns, and in-app experiences.

Overview

Handling deep links in your Android application allows you to:

  • Support Deep Link notification types from Actito.
  • Handle custom URL schemes or HTTPS links from web pages.

Once configured, your app can interpret incoming URLs and display the appropriate screen or content dynamically.

Declaring a custom URL scheme

In order to indicate your app that you will handle a custom URL scheme you simply have to configure the native part of your app to accept said URL schemes.

Declare the following in the config.xml and be sure to update the scheme to match yours:

<platform name="android">
<config-file target="AndroidManifest.xml" parent="/manifest/application/activity/[@android:name='MainActivity']">
<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="com.example" />
</intent-filter>
</config-file>
</platform>

When a user opens a deep link — either from a notification or a web page — your application will be executed and the Actito.onUrlOpened event will be called:

Actito.onUrlOpened((url) => {
// process the deep link
});

This implementation ensures that standard deep links are properly handled.

If your app needs to open external deep links (for example, to open URLs in the browser), Android 11 and higher requires you to declare supported schemes explicitly in your manifest:

Declare the following in the config.xml:

<platform name="android">
<config-file target="AndroidManifest.xml" parent="/manifest/application/activity/[@android:name='MainActivity']">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent-filter>
</config-file>
</platform>

This allows your application to safely query and launch external URLs.

Deep links are also used within HTML and Web Page notification types. To handle links clicked inside these notifications, declare the supported URL schemes in your manifest and define them in a resource file.

note

This functionality is available only when notifications are presented using the actito-push-ui module. If you handle notification presentation manually, you are responsible for processing clicked URLs within your own implementation.

In your config.xml:

<platform name="android">
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<meta-data
android:name="com.actito.push.ui.notification_url_schemes"
android:resource="@array/notification_url_schemes" />
</config-file>

<resource-file src="notification_url_schemes.xml" target="/app/src/main/res/values/notification_url_schemes.xml" />
</platform>

This entry will require you to create a notification_url_schemes.xml file in the root of your project with the following content:

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="notification_url_schemes">
<item>com.example</item>
<item>com.example2</item>
<item>com.example3</item>
</string-array>
</resources>

This configuration allows the SDK to intercept links matching any of the defined schemes and trigger a callback when clicked.

Any click in an HTML or Web Page notification type, would be intercepted by our library and trigger the event ActitoPushUI.onNotificationUrlClicked.

ActitoPushUI.onNotificationUrlClicked(({ notification, url }) => {
console.log(`Clicked link: ${url}`);
});