React-Native Android App Works in Debug but Not Release

I am working with a React-Native Android application using action-native-fcm. We receive notifications created by our application server that notify the user that they are receiving product shipment. When we test this feature in debug mode, it works fine. Every time a release build is created and uploaded to the Play Store, we are not notified. We don’t even have Firebase tokens. I will be back with Firebase on our application server saying "NotRegistered".

What do we have:

  • I created a separate project using the Firebase console to create the correct google-services.json file (and the package names match).

  • google-services.json is in the correct directory (project name / android / application)

  • I am using the HTTP version of cloud messaging and I am using the old server key provided in the Firebase console.

  • Using version 11.0.4 as Firebase (having worked both the core libraries and cloud messaging systems) and google-play-servies-base, use the plugin: "com.google.gms.google-services" at the bottom of the gradle file. build in the android / app directory.

  • The version of Google services is 3.1.0 in the build.gradle file in the Android directory.

  • minifyEnabled is set to false, so ProGuard should not exclude Firebase when creating a release version.

It just seemed like a problem when we switched to JavaScript. I did not have this problem when the application implementation was in Java. Any help is appreciated.

Thank!

+4
source share

Source: https://habr.com/ru/post/1689406/


All Articles