Handling notifications
- Manually handle User.com notification
You can receive
UserComNotification
object fromActivity.getIntent()
orcom.google.firebase.messaging.RemoteMessage
>. Simply useUserComNotification.create(…)
factory.Receiving notification from Activity looks like:
@Nullable UserComNotification notification = UserComNotification.create(getIntent().getExtras());
and from
FirebaseMessagingService.onMessageReceived()
like this:@Nullable UserComNotification notification = UserComNotification.create(remoteMessage.getData());
This creators return
null
if passed data does not containuser_com_notification
key so you can use this safely with your own notifications.