Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to identify which action button is clicked when two buttons are added for Android push notification #1396

Closed
alnsantosh opened this issue Aug 13, 2018 · 3 comments
Labels
API: Notifications Notifications API - do not use for FCM ( messaging() )

Comments

@alnsantosh
Copy link

Issue

I am unable to identify which action button is clicked when there are multiple action buttons present in the push notification.
Also on clicking the button when the app is in the background, NotificationOpen.action is android.intent.action.VIEW instead of the value which I set when creating an action for the button.

Environment

  1. Application Target Platform:
    Android
  1. Development Operating System:
    macOS Sierra
  1. Build Tools:
    Android Studio 3.1.3
  1. React Native version:
    0.53.0
  1. React Native Firebase Version:
    4.3.8
  1. Firebase Module:
    Notifications
  1. Are you using typescript?
    no

Loving react-native-firebase? Please consider supporting them with any of the below:

@Ehesp Ehesp added the API: Notifications Notifications API - do not use for FCM ( messaging() ) label Aug 14, 2018
@alnsantosh
Copy link
Author

@Salakar , Please help me with this issue. It is not letting me to use action buttons for the android push notification.

@Salakar
Copy link
Member

Salakar commented Aug 17, 2018

Duplicate of #1330.

@Salakar Salakar closed this as completed Aug 17, 2018
@trimitrtechnologies
Copy link

trimitrtechnologies commented Mar 6, 2019

If still facing problem to render Action button, make sure you've imported

import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;

In MainApplication.java

and added
new RNFirebaseNotificationsPackage() line inside getPackages()

it will looks like below:

protected List<ReactPackage> getPackages() {
            return Arrays.<ReactPackage>asList(
            new MainReactPackage(),
            new RNFirebasePackage(),
            new RNFirebaseMessagingPackage(),
            new RNFirebaseNotificationsPackage()
      );
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: Notifications Notifications API - do not use for FCM ( messaging() )
Projects
None yet
Development

No branches or pull requests

4 participants