-
Notifications
You must be signed in to change notification settings - Fork 17
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.
You can define your own custom theme for the webView in styles.xml
and change action bar / toolbar and notification bar colors, colorPrimary
and colorPrimaryDark
respectively. Use IB_AppTheme.WebView
name.
<resources>
<style name="IB_AppTheme.WebView">
<item name="colorPrimary">@color/colorPrimary</item> <!-- color of toolbar background -->
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <!-- color of status / notification bar -->
<item name="colorControlNormal">@android:color/white</item> <!-- color of navigation icon in toolbar -->
<item name="titleTextColor">@android:color/white</item> <!-- color of toolbar title text -->
</style>
</resources>
Theme usage example you can find in our Firebase example application and Huawei example application, provided with SDK.
From version 12.x onwards, HTTP is disabled by default for security reasons, see migration guide for more information.
If you have any questions or suggestions, feel free to send an email to [email protected] or create an issue.
- Library events
- Server errors
- Users and installations
- Messages and notifications management
- Inbox
Geofencing API- DEPRECATED- Android Manifest components
- Privacy settings
- In-app chat
- Infobip RTC calls and UI
- Backup rules