-
Notifications
You must be signed in to change notification settings - Fork 17
How to open application webView on message tap?
To provide url, that should be opened on notification tap or on in-app notification primary button tap, you can use API by specifying notificationOptions.primaryButtonAction
as follows:
"notificationOptions": {
"primaryButtonAction": {
"resource": "http://someurl.com",
"type": "WEB_VIEW_URL"
}
}
Another option is by setting up Mobile Push Broadcast on Infobip portal, specifying action properties.
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.
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