How to define specific action on notification or in app primary button tap(open url, deeplink)? - infobip/mobile-messaging-flutter-plugin GitHub Wiki
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 Journeys (formerly 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 options.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
webViewSettingsinsideiosin configuration, while initializing MobileMessaging.
InfobipMobilemessaging.init(Configuration(
...
iosSettings: (
...
webViewSettings: WebViewSettings(
title: "Title", //Custom title
barTintColor: '#ffffff', //Toolbar color
titleColor: '#000000', //Toolbar title color
tintColor: '#000000', //Toolbar button color
),
),
));- 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>,
}