-
Notifications
You must be signed in to change notification settings - Fork 21
How to open application webView on message tap
It's possible to provide URL, that will be opened on the webView, on notification tap or on Mirror push notification primary button tap automatically by MobileMessaging SDK.
To provide WebView URL via Broadcast or Flow choose "Mobile Push" channel and specify action button properties:
- Action: "Open URL within webView"
- WebView URL: "your URL"
Also, you can provide WebView URL for push or Mirror push notification using API by specifying notificationOptions.primaryButtonAction
as follows:
"notificationOptions": {
"primaryButtonAction": {
"resource": "http://someurl.com",
"type": "WEB_VIEW_URL"
}
}
No additional coding is needed, but you could customize web view appearance or setup custom view controller for presenting web view
If you need to customize the title, toolbar appearance or activity indicator, implement the following callback function in your custom MessageHandlingDelegate (How to set up custom MessageHandlingDelegate:
class MyMessageHandlingDelegate : MMMessageHandlingDelegate {
func inAppWebViewWillShowUp(_ webViewController: MMWebViewController, for message: MM_MTMessage) {
webViewController.title = "Breaking news!" // to specify a custom title
webViewController.barTintColor = UIColor.blue // to change the toolbar color
webViewController.titleColor = UIColor.white // to change the toolbar title color
webViewController.tintColor = UIColor.red // to change the toolbar button color
webViewController.activityIndicator = YourCustomActivityIndicator() // implement your own UIView subclass that conforms to ActivityIndicatorProtocol protocol to replace the standard activity indicator
}
}
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
Geofencing serviceDEPRECATED- Privacy settings
- In-app chat
- WebRTC Calls and UI