The problem is following: we have an application with two backends - dev and prod. Each one contains different set of users. A developer can switch between them with some known to him actions in app on the fly. So for fcm we created two projects - one for dev environment and another for prod environment. On iOS we can switch between as following:
if([FIRApp defaultApp] != nil){
[[FIRMessaging messaging] disconnect];
[[FIRApp defaultApp]deleteApp:^(BOOL success){
FIROptions* firebaseOptions = [[FIROptions alloc] initWithContentsOfFile:firebaseConfigPath];
[FIRApp configureWithOptions:firebaseOptions];
}];
}
else{
FIROptions* firebaseOptions = [[FIROptions alloc] initWithContentsOfFile:firebaseConfigPath];
[FIRApp configureWithOptions:firebaseOptions];
}
firebaseConfigPath
is chosen for corresponding environment.
How to implement the same on Android? Thanks