in order to test Chat sample on Android, you need to create google-services.json file and copy it into project's android/app folder. Also, you need to update the applicationId in android/app/build.gradle to the one which is specified in google-services.json, so they must match.
There was an issue on Android with receiving a callback when a push arrived and an app is in killed/dead state. We addressed it here:
-- we created a patch to push notification lib - patches/react-native-notifications+4.3.1.patch - which is applied automatically when you do yarn (it's specified as a part of package.json postinstall step - "postinstall": "patch-package && npx jetify && cd ios && pod install")
-- you also need to add <service android:name="com.wix.reactnativenotifications.JSNotifyWhenKilledTask" /> into AndroidManifest.xml file
-- and now you can process the notifications in killed/dead state via the following code snippet:
CHANGES
TODO:
Push Notifications details:
With new push notifications lib we bring some changes to the setup process
google-services.json
file and copy it into project'sandroid/app
folder. Also, you need to update theapplicationId
inandroid/app/build.gradle
to the one which is specified ingoogle-services.json
, so they must match.patches/react-native-notifications+4.3.1.patch
- which is applied automatically when you doyarn
(it's specified as a part ofpackage.json
postinstall step -"postinstall": "patch-package && npx jetify && cd ios && pod install"
) -- you also need to add<service android:name="com.wix.reactnativenotifications.JSNotifyWhenKilledTask" />
intoAndroidManifest.xml
file -- and now you can process the notifications in killed/dead state via the following code snippet: