react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

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

Open alnsantosh opened this issue 8 years ago • 3 comments

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:

alnsantosh avatar Aug 13 '18 23:08 alnsantosh

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

alnsantosh avatar Aug 17 '18 17:08 alnsantosh

Duplicate of https://github.com/invertase/react-native-firebase/issues/1330.

Salakar avatar Aug 17 '18 21:08 Salakar

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()
      );
    }

trimitrtechnologies avatar Mar 06 '19 08:03 trimitrtechnologies