-3

I have an application with the following configurations: (let suppose)

1) App name <"ZPE Location Aware">

2) App icon <"given by the company">

3) App Web service url <"will be embeded in Application">

Note: this web service url is the url which will be used to make the web service call to perform different task.

Now we have this app , an Idea is that , when we are giving this app to our other customer then the App name should get change by web service to the other let say from "ZPE to MPE" and also the app icon gets change so also the url should be change

Now please tell me how can it be done ? I am reading about build flavor but it does not look like my case.

So how can this thing be done ? what is better approach to perform this task ?

A.s.ALI
  • 1,992
  • 3
  • 22
  • 54

1 Answers1

0

App name and icon are written inside the manifest.xml file, and this file is encoded in the apk (you can open it as a zip file if needed). So there are no real ways to change the app information runtime, the only way is to distribute a different apk.

Anyway, you can browse this answer, that suggests you how you can substitute an icon through a listener; this is not a real "icon change", and you will always have a standard icon that is visible before it is temporarily changed by a runtime program.

Update: As soon as you have Android Studio installed and the source code of the app, you can:

  • change app_name inside strings.xml
  • change the url that you can put inside strings.xml too
  • change the icons inside mipmap_* directories.
  • make a new apk

It's rather a fast work that can be done in 2 minutes, so I don't see a big problem in it. You could even automize it with gradle, but I think it isn't worth the work.

Community
  • 1
  • 1
Beppi's
  • 2,089
  • 1
  • 21
  • 38
  • so u mean that we can not change these three things client by client ? – A.s.ALI Dec 05 '16 at 10:44
  • and these things need to be embedded fullY? – A.s.ALI Dec 05 '16 at 10:44
  • The first two, certainly not: to distribute them to different clients you have to compile them one by one with each custom data, because that data is statically set inside the apk. The third point is not an Android problem, rather a programmatical problem, and you can surely find a programmatical solution. – Beppi's Dec 05 '16 at 10:47