Dynamic google services configuration - android

I have an Android app handling notifications through IBM Bluemix. I created a google-services.json file, added it to the project. It works like a charm.
But now, I want to deploy a generic version of the app to the store. That application will serve different customers, where each customer has to create his own Firebase project and Bluemix account. When initializing, the application should read the necessary ids/secrets from a server instead of getting the values embedded statically in the app.
I saw that the google-services.json file is a convenient way to generate resources in values.xml, but I didn't find how to have these values set dynamically at runtime. Any idea?

Related

Using firebase different apps same project vs different projects

I'm an android developper and i've a few apps published on google play... I do myself every single aspect of my apps including maintence.
I've two similar apps that share some core API... they dont share database nor storage, just some java API of my own and some google cloud functions i made (public)
When i was preparing the firebase infrastructue to run the second one i decided for creating a second app in the same firebase project as the first one... this was a decision made basically because i hated the firebase "switch between projects" tools.
my question is:
what are the advantages and disadvntages of having multiple apps sharing same firebase project?
when should i create a new project for a new app and when should i reuse the project
I'm a single self suficient developper so any sort of "project permissions" wont make difference to me
The primary reason to have multiple apps in the same project is when you want to share database and user data between them. Multiple apps in the same project are definitely expected to share data and configuration across all Firebase products. A common use case is when you have an end-user app and an admin app, both working against the same data.
If you're not sharing data between the apps, then you will only run into future trouble if you have multiple apps in the same project. (For example, see this question which was asked at the same time as yours.)

Create separate SHA-1 Key for same package ID in Firebase

I've created 2 different firebase projects. One for development and one for production (myProjectDev, and myProject). I've also created an app with Ionic that runs on both ios and android platforms.
I want to use the same bundle/package ID for both firebase projects because if I change the bundle/package ID then I'm forced to setup an entirely separate app in TestFlight/Google play store. I feel like I shouldn't have to do that but then again I'm new to a lot of this.
So with that being said I'm trying to figure out how to generate 2 different SHA-1 keys for the same package ID (com.mycompany.myproject)
I suppose that you can't do that.Instead you can choose paid database instead of Spark so that you can use two separate databases for the same project with same package.

GCM - do i need to save one "google-services"(json file) on two diffrent projects?

i have two projects in android studio. the first one is called "test1" and the second is "test2". i want to use google cloud messaging to communicate with each other. my question is, do i need to use the same "google-services json file (downloaded from google website) on both projects, and also the same project id?
or use diffrent google-services files?
you have to use two different json files, because first project package name and second project package name are different. Google will generate server key depends on package name.
I do not understand the communication word between two different projects. (You mean example to say Facebook send push notifications to Twitter ? )
If you have two different Projects, Yes you need two google-services.json files because both projects have different package names and Sender-ID(i.e Project ID in google console )
If you want communication between two application's (not two different projects), then you can simply use ONE google-services.json file
Note: With out google-services.json file also Servies works well in production but not after releasing your app in public.
Also read What is google-services.json to get clear idea of it.

Multiple Google Configuration Service

I am using two Google services in my app. Both the services are created/registered with two different email addresses.
Google cloud Messaging - a#gmail.com.
Google Analytics - b#gmail.com
Now I came to know about Google Configuration JSON files. Can we have multiple files in the same project where different services can refer to different files?
As already answered in How to integrate two or more google-services.json file together for different google service in same project using Android Studio, you do not need two different google-services.json files. Both will have identical configurations. These configuration files are unique for every project irrespective of how many services you have activated.
With reference to getting a configuration file for Google Cloud Messaging and Google Analytics, wherein you must select an existing project for your app, it shows that both have identical google-services.json file.
And as noted, as you keep adding services, the google-services.json file gets updated. The last file you download has all the services activated.

How to make sure if custom sdk can be used for only one play store app?

I am new to android ECO System. I am just writing a code and created .aar file which other developer can use this.
1) Is it possible to make sure only one application can be developed and uploaded to app store using this aar file.if I provide to another developer.
2) Other than this developer, it should not be used by others. For this probably i can go with API Key Concept. this

Categories

Resources