I have an application that is different for each user, id application is different for each user, so idApplication is dynamic. My problem is that json retrieved from firebase is linked to a single application id. How can I use one file json for all the applications I generate dynamically?
_______édit ____
I don't know thé application id, this application id is modified on a filé jenkins.properties on my project Android, and when jenkins générate New apk it do it with thé New id
Instead of relying on google-services.json
and associated gradle plugin you can dynamically create FirebaseApp
using something like following (I have this in dagger module)
FirebaseOptions firebaseOptions = new FirebaseOptions.Builder()
.setApiKey(apiKey)
.setApplicationId(someApplicationId)
.setDatabaseUrl(databaseUrl)
.setStorageBucket(storageBucket)
.build();
firebaseApp = FirebaseApp.initializeApp(context, firebaseOptions, "MyApp");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.