From 4354686a5a59fa6c7bd292542d6900cf79075fb3 Mon Sep 17 00:00:00 2001 From: Libin Lu Date: Wed, 7 Mar 2018 10:44:36 -0500 Subject: [PATCH] Update README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 3695ab3..29a8139 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,19 @@ https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-clien include ':app' ``` +- Edit `MainActivity.java`. This fixes [a bug](https://stackoverflow.com/questions/14853327/intent-not-restored-correctly-after-activity-is-killed-if-clear-top-and-single-t/18307360#18307360) +```diff ++ import android.content.Intent; +... +public class MainActivity extends ReactActivity { ++ @Override ++ public void onNewIntent(Intent intent) { ++ super.onNewIntent(intent); ++ setIntent(intent); ++ } +} +``` + ### Config for notification and `click_action` in Android To allow android to respond to `click_action`, you need to define Activities and filter on specific intent. Since all javascript is running in MainActivity, you can have MainActivity to handle actions: -- 2.26.2