evollu / react-native-fcm

react native module for firebase cloud messaging and local notification
MIT License
1.73k stars 681 forks source link

Which AndroidManifest.xml for click_action? #498

Open SelaO opened 7 years ago

SelaO commented 7 years ago

Both of the following mention AndroidManifest.xml: https://github.com/evollu/react-native-fcm#config-for-notification-and-click_action-in-android https://github.com/evollu/react-native-fcm#setup-local-notifications

But there are several files with similar content, so which one should be edited?

weekian commented 7 years ago

Hi,

If you are talking about which androidManifest.xml file to edit for opening the application via a click action on notification received in the tray, it is this android/app/src/main/AndroidManifest.xml in your main react native project.

As for what should be edited in the AndroidManifest.xml, it is the first link: https://github.com/evollu/react-native-fcm#config-for-notification-and-click_action-in-android

Do note that in your notification fired, there should be a click_action variable containing the intent you specified, in the example fcm.ACTION.HELLO

I don't seem to find several files with similar content. Maybe you might want to post more details about that

SelaO commented 7 years ago

Here are several files:

image

Anyway, it should mention exact path of any file that needs to be edited.

Is the second AndroidManifest.xml file the same?