Commit 4cb2cd02 authored by Jérémy M's avatar Jérémy M Committed by GitHub

Update readme onNewIntent prototype change

parent b5060d35
...@@ -65,15 +65,19 @@ and pass intent into package, change MainActivity.java ...@@ -65,15 +65,19 @@ and pass intent into package, change MainActivity.java
```java ```java
import android.content.Intent; <--add this line next to the other imports import android.content.Intent; <--add this line next to the other imports
@Override <--add this line // Add this line to update intent on notification click
protected void onNewIntent(Intent intent){ <--add this line @Override
setIntent(intent); <--add this line to update intent on notification click // in RN <= 0.27 you may need to use `protected void onNewIntent (Intent intent) {`
} <--add this line public void onNewIntent (Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
}
// Add package
@Override @Override
protected List<ReactPackage> getPackages() { protected List<ReactPackage> getPackages() {
... ...
new FIRMessagingPackage(getIntent()), <--add getIntent() new FIRMessagingPackage(getIntent()), // <-- add getIntent()
... ...
``` ```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment