-
Notifications
You must be signed in to change notification settings - Fork 7
How to define specific action on notification or in app primary button tap(open url, deeplink)?
Supported on React Native since version 2.2.2.
Available actions:
- Opening of the external web content in webView
- Opening of the external web content in device browser
- Opening of particular mobile app screen over deeplink
To set up action via Broadcast or Flow choose "Mobile Push" channel and specify action button properties:
- Action: Choose from the list
- URL: Provide required URL or deeplink
Also, you can set up action for push or Mirror push notification using API by specifying notificationOptions.primaryButtonAction
Will be opened automatically without additional coding for both iOS and Android platforms, to customize UI of the view you can use following approaches:
- iOS - provide
webViewSettings
insideios
in configuration, while initializing MobileMessaging.
mobileMessaging.init(
{
...
ios: {
...
webViewSettings: {
title: "Title", //Custom title
barTintColor: '#ffffff', //Toolbar color
titleColor: '#000000', //Toolbar title color
tintColor: '#000000', //Toolbar button color
},
},
},
() => {
console.log('MobileMessaging started');
},
error => {
console.log('MobileMessaging error: ', error);
},
);
- Android - could be customized as described in How to open application webView on message tap?
Will be opened automatically without additional coding for both iOS and Android platforms
How to use "deeplink" to land user to a particular app page?
message
object will contain following fields, depending on action, which is used.
message: {
...
browserUrl: <string, url to open in browser>,
deeplink: <string, deeplink url>,
webViewUrl: <string, url to display in webView>,
}
If you have any questions or suggestions, feel free to send an email to support@infobip.com or create an issue.
- Library events
- Server errors
- Users and installations
- Messages and notifications management
- Inbox
- Privacy settings
- In‐app chat
- WebRTC Calls and UI
- Migration guides