From 4cb2cd021cb62b8dbcd6273c56413dcd16aaf996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20M?= Date: Thu, 30 Jun 2016 10:27:01 +0200 Subject: [PATCH] Update readme onNewIntent prototype change --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e077df4..8debec3 100644 --- a/README.md +++ b/README.md @@ -65,15 +65,19 @@ and pass intent into package, change MainActivity.java ```java import android.content.Intent; <--add this line next to the other imports -@Override <--add this line -protected void onNewIntent(Intent intent){ <--add this line - setIntent(intent); <--add this line to update intent on notification click -} <--add this line +// Add this line to update intent on notification click +@Override +// in RN <= 0.27 you may need to use `protected void onNewIntent (Intent intent) {` +public void onNewIntent (Intent intent) { + super.onNewIntent(intent); + setIntent(intent); +} +// Add package @Override protected List getPackages() { ... - new FIRMessagingPackage(getIntent()), <--add getIntent() + new FIRMessagingPackage(getIntent()), // <-- add getIntent() ... ``` -- 2.26.2