I have 2 projects in Firebase: nl.companyname and nl.companyname.acc:
This is my build.gradle:
flavorDimensions "type"
productFlavors {
acceptance {
dimension="type"
applicationIdSuffix ".acc"
versionNameSuffix "-acc"
}
production {
dimension="type"
applicationIdSuffix ""
versionNameSuffix ""
}
}
The download google-services.json is in directory: app/google-services.json
Android Studio is logged in to the Google account and synchronized:
The message shows up as successfully sent:
Problem description:
When sending a message on nl.companyname, it works.
When sending a message and targeting the device's Token ID, it works.
But the nl.companyname.acc doesn't work.
Steps tried:
Any help is greatly appreciated.
The FCM backend receives the message request, generates a message ID and other metadata, and sends it to the platform specific transport layer. When the device is online, the message is sent via the platform-specific transport layer to the device. On the device, the client app receives the message or notification.
In the Firebase Document, it supports multiple flavor based project.
You can have multiple google-services.json files for different build variants) by placing google-services.json files in dedicated directories named for each variant under the app module root. For example, if you have "development" and "release" build flavors, your configuration could be organized like this:
app/
google-services.json
src/development/google-services.json
src/release/google-services.json
...
You can find full instruction at here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With