1

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?

Seraphim's
  • 12,559
  • 20
  • 88
  • 129
  • If I were to read your question literally, the answer would be "sure, just make multiple apps and then don't publish any of them on Google Play! :-) Point being, I have no idea from this question what you want to do. Do your several customers only run one instance of the app each? Or does each customer have thousands of users, and you want one admin account for each after which the users somehow get the app as configured by that admin? Your question cannot be answered without more specific information. Why do you even want this app on Google Play? Why not just send it to your customers? – Carl Jul 04 '13 at 23:33
  • @Carl The phrase: "Or does each customer have thousands of users, and you want one admin account for each after which the users somehow get the app as configured by that admin?" Fit the need. I Use my own distribution platform but I want also to be on the Google Play. I feel no good karma for that... – Seraphim's Jul 05 '13 at 14:39
  • This comment is as cryptic as your original post. I still have no clear idea of what you're trying to do. Understand, I'm just asking you to clarify, not criticising whatever you're attempting to do, of which I have very little idea. – Carl Jul 07 '13 at 04:02

2 Answers2

3

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:

Multiple Apps with a Shared Code Base

Community
  • 1
  • 1
Carl
  • 15,445
  • 5
  • 55
  • 53
1

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);
Ldev
  • 318
  • 1
  • 13
  • But I still need the customer user to choose the brand at first app run! – Seraphim's Jul 04 '13 at 14:46
  • It depends on "how you manage to authenticate the customer". If it's via login/id, you can have a map (customerID => imageId) (or even use a unique ID for both...) ? – Ldev Jul 04 '13 at 14:57