This article is for Futurae customers who integrate the Futurae Mobile SDK into their own mobile apps and wish to customize the push notification text that is displayed on the end user’s phone according to specific language or other business requirements.
How to customize the push notification text?
The approach is specific depending on the operating system platform, and below we cover both Android and iOS platforms.
iOS
The iOS push notifications that are sent by the Futurae backend, already have the mutable-content
flag set, which means that you can create an app extension to intercept and change the notification in the way you wish. Please find more details at the iOS link available in the Useful references section.
Android
For the Android platform, the push notifications sent by the Futurae backend are data messages (please refer to the Android link in the Useful references section) and your app receives them in the background (in an FirebaseMessagingService
subclass), so it can manipulate them as needed, before posting a local visible notification on the system tray/lock screen.
Useful references
iOS modifying push notifications content https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications
Android data messages
https://firebase.google.com/docs/cloud-messaging/concept-options#data_messages
Comments
0 comments
Please sign in to leave a comment.