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
Expo typically generates a scheme based on your bundleIdentifier for iOS and package for Android. You can configure additional schemes in your app.json, as shown in the example below. Make sure to update the scheme to match your own configuration:
{
"expo": {
// more code...
"scheme": "com.example"
}
}
With this configuration, links such as com.example://example.com/product?id=1 will automatically open your application.
Handling deep links intents
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.
Handling notification links
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.
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.
- Android
- iOS
In your app.json:
{
"expo": {
// more code...
"plugins": [
[
"react-native-actito-push",
{
"android": {
"urlSchemes": ["com.example", "com.example2", "com.example3"]
}
}
]
]
}
}
In your ActitoOptions.plist:
<plist version="1.0">
<dict>
<key>URL_SCHEMES</key>
<array>
<string>com.example</string>
<string>com.example2</string>
<string>com.example3</string>
</dict>
</plist>
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}`);
});