# Handling notifications

Manually handle User.com notification

You can receive UserComNotification object from Activity.getIntent() or com.google.firebase.messaging.RemoteMessage>. Simply use UserComNotification.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 contain user_com_notification key so you can use this safely with your own notifications.