I need to publish the same app for several of my customer. Each customer needs its own logo and color theme.
Any chance to do this without multiple pubblications on Google Play?
I need to publish the same app for several of my customer. Each customer needs its own logo and color theme.
Any chance to do this without multiple pubblications on Google Play?
As mentioned above, I have had to guess somewhat about what you are trying to do, but since you say that there is no authentication then here is a suggestion that I made up myself just now but which has never, to my knowledge, been tried by anyone, including me. Still I can't see why it wouldn't work:
Provide a URL linking to your app's Google Play listing page, and add a referrer parameter to that URL that is different for each branding. This looks like this:
https://play.google.com/store/apps/details?id=com.example.app&referrer=brand1
https://play.google.com/store/apps/details?id=com.example.app&referrer=brand2
etc.
Each customer will get a URL with the assigned brand of that customer in the referrer parameter.
These referrer parameters are typically used to track the source of a link for marketing purposes (e.g., from an Adwords ad). They get fed by the Google Play app to your app during the install process.
To use this for tracking, your app is supposed to forward information obtained from the referrer parameter (via Google Play) to Google Analytics, in order to track how many installs come from each source (e.g., a particular ad campaign).
But my suggestion is that you just use that data yourself to save off the branding selection indicated by the URL's referrer parameter to non-volatile memory (e.g., SharedPreferences) or to a place on the SD card that will survive data clearance if you want something that will survive a clearing of the app's data by the user. Then, each time your app is initialized, you can load the correct branding resources based upon the brand contained in that referrer string that was stored during the install process.
Here are instructions on how to use the referrer parameter:
Google Play Campaign Measurement
Hope that is what you're looking for. If not, a clearer problem statement could go a long way to getting the answer you are seeking.
What you're trying to do (if I understand it correctly) seems rather strange and unorthodox to me. Ultimately, you'll probably regret it, because the moment one customer wants a feature other than branding that is significantly different from what is required by other customers, you'll be creating all kinds of special case code in your single APK, and bugs introduced for one may be felt by all the others, and so on. In short, it is a nasty violation of the core principle of modularity.
The more typical approach would be to create multiple apps (one for each client) from the same Project Library, with branding (and any other app-specific features) selected via an override of a method in each specific app's Activity class (which derives from the library's activity class). Duplicate development and maintenance is thereby minimized, and you have separate apps for each customer. The branding resources do not have to be duplicated - you just include different branding resources with each app. If you would like to take that approach, then here is a description of how that can be done:
You can change theme programmatically with
setTheme( android.R.style.MyTheme );
So basically you could check which customer is using the app and load the matching theme.
For logo / image resources you could get it via HTTP, and then set it ?
URL url = new URL("http://images.com/image?id=customerId");
Bitmap myBitmap= BitmapFactory.decodeStream(url.openConnection().getInputStream());
imageView.setImageBitmap(myBitmap);