I used an app to update the database of various apps simply by modifying the Firebase database URL and idProject. My question is, am I now limited to only the database corresponding to the Google_Json file?
Hi dear,
Technically, using Android Studio or similar tools, it would be possible to target multiple files.
Unfortunately, Kodular can only use a single file if it’s named google-services.json.
To work around this, I recommend using Firebase through the Web component.
Below is a great guide by Tim that explains everything in detail.
To clarify, this is not entirely true. In Android Studio, you can have multiple “flavours” of files (one for testing, other for release, etc.). However, when building the app, only one can be chosen.
You can also customize the values.xml and hardcode the strings for the Database URL instead of using google-services.json. But you’re still limited to a single value / DB.
The only difference of Android Studio is managing multiple files. When building, only once value is chosen.
And that shows you’re the master here
, you’re absolutely right, I hadn’t fully understood the official documentation.
At this point, I think the simplest solution is to use the Web component and switch the URL.
In that case, I think it’s best to create a copy of each application with the same package name and use each one with its respective Google JSON file, then install it on a separate smartphone just to make those database changes. That way I’ll have to create several administrator apps using only one.
Sure, that’s also an option, but is it really that convenient? ![]()
With the Web component, you could instead create a dictionary variable containing the different configurations
and then use something like a ListPicker or similar to select one of them.
That way, you would have a single procedure that, depending on the selection, points to a different database.
