Skip to end of metadata
Go to start of metadata

Specially for Android, Crosslight provides you a space for customizing the appearance of push notification. There are several options for displaying push notification, such as base layout, expanded layout. To learn more, please refer to this link: Notification on Android.

CustomPushMessageHandler implements IPushMessageHandlerService which has a method called HandleMessage. HandleMessage is the exact method for customizing te push notification message. In order to achieve this, you need register your service:

AppInitializer.cs

Next, override OnReceived in NotificationBootReceiver and NotificationBroadcastReceiver. Inside this method, you should GetService of IPushMessageHandlerService. See this code below: 

NotificationBroadcastReceiver.cs & NotificationBootReceiver.cs

Once you resolve the IPushMessageHandlerService, create a class that implements IPushMessageHandlerService. In this case, the class will be named CustomPushMessageHandler.

CustomPushMessageHandler.cs

 

You have successfully customized the push notification appearance. To learn more about push notification, read Handling Push Notifications sections consecutively.

  • No labels