Hello guys, I have an app that is used by multiple...
# android
s
Hello guys, I have an app that is used by multiple customers. Each customer has a little bit of modification in the business logic and has their own logo and color theme. Each customer expects customized app for same business solution. It is unwise to deploy one app for each customer with different names in playstore. I want to deploy a single app which when the customer downloads and logs in, he sees his company logo and color theme and Business logic. Can any one help me out with this type of deployment on play store please.
r
With a specific configuration saved into a database (remote, like Firebase ?). When the user is connected, you retrieve its configuration, and apply it. For business logic, it depends on the complexity... Same with a configuration. No ?
o
We have such kind of apps. But in our case we have separate apps for each customer. It’s not a bad solution actually. But it depends on how customers you have. In our case it’s about 5-6. If you don’t have a lot so think about separate apps. It’s much easier to support. We use flavors for each customer. As said in the previous post you can use server side solution retrieving some config from the server. But there are disadvantages as well: how to get logo, images, color scheme, resources - store it on the server or store all resources in the apk?
r
I think, you can download resources, logos, etc.. One time, and cache them. If an update is needed, configuration can be triggered. We use that on our application too. After each connection, or with a recurrent job (like Workmanager => each day), we poll the configuration endpoint. If the configuration version is different (2.1 => 2.2), configurations are refreshed, and store locally. I think different app are not bad at all, because, you implement some specific business logic for each customers. It’s not reliable if the app grown up imo.
l
You can use launcher shortcuts to allow users to add the personalized icon from an image you got from a server. The original icon will be kept in the launcher though, there's no way around it because of security concerns (image an app changing its icon and name without updates, and faking being your phone app for example). Doc here: https://developer.android.com/guide/topics/ui/shortcuts AND here: https://developer.android.com/reference/kotlin/androidx/core/content/pm/ShortcutManagerCompat
👍 1
d
If you don't have a large variety, I would use flavours
s
Thanks guys, app flavours is an option I am considering for now. At my company I had proposed getting user specific configurations from server and storing them locally but business ppl were really concerned about maintainability of the project as customers grow. And apk size as we reached 50+ customers. Plus there were security concerns of having every customers business logic in the same app. If some one reverse engineered the apk he would find secret keys, ssl certificates of all the other customers! So we were basically looking for some solution where the customer would only get his solution along with his UI configuration when he downloads the app.
o
By the way, what’s about downloadable dynamic feature modules? I’ve never used this feature…but may it work for such cases?
l
If the app icon is different for all customers, you'd need to embed them all in the base module AFAIK, but for custom logic, and other resources, yes, it should work.