# Manual Notification Handling


If you need to handle User.com notifications directly in your code, you can manually retrieve the UserComNotification object using the factory method.

INFO

This approach is useful when you need custom handling of User.com notifications beyond the default behavior.

# Retrieving Notification Objects

You can obtain the UserComNotification object from two sources:

  • From an Activity using getIntent().getExtras()
  • From a RemoteMessage in your Firebase messaging service
  • Kotlin
  • Java
// From Activity
val notification = UserComNotification.create(intent.extras)

// From FirebaseMessagingService
val notification = UserComNotification.create(remoteMessage.data)

The create() method safely returns null if the passed data doesn't contain the user_com_notification key, allowing you to use it alongside your existing notification system without conflicts.