0

There are several versions of my app, all created from the same source. Thus far I have been able to conditionally set all the necessary changes between the versions at runtime by reading the app package name. However, one thing that this method doesn't work for is setting the app label (i.e. its name in the launcher), which according to other answers on stackoverflow can't be done at runtime.

My question is, is there anything I can do at build time to avoid having to manually edit the app label? Ideally it should be conditional on package name (a requirement set by our client), but other options may be considered.

aaronmarino
  • 3,723
  • 1
  • 23
  • 36
  • Maybe, you might modify your build.xml, add a new task to be called before -pre-build. And this task can read your package name from AndroidManifest.xml and update your string resources where you're setting the app label? Bunch of shell execution and regexp replace operations in theory..How does that sound? – Can Elmas May 22 '13 at 13:43
  • That's exactly what I was hoping to avoid (not least because I have no experience in building android projects in such a way), but I guess I'd better start doing some reading. I was hoping there may have been a simpler alternative I wasn't aware of. – aaronmarino May 22 '13 at 15:57

0 Answers0