0

When click on a notification it should be open a custom Intent for Firebase notification payload.

click_action returns null when set any Intent name

So, is it possible to set an Intent on click of a notification.

Nimantha
  • 6,405
  • 6
  • 28
  • 69

1 Answers1

2

click_action: Indicates the action associated with a user click on the notification. When this is set, an activity with a matching intent filter is launched when user clicks the notification.

So you have to add intent filter to your activity in manifest file.

<intent-filter>
    <action android:name="clikcActionNameHere"/>
    <category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
Muzaffer
  • 1,457
  • 1
  • 13
  • 22