Android Question One code, many apps

Walter Adriano da Silva

Member
Licensed User
Longtime User
Hi Erel,

In my project I intend to deploy the same application to multiple clients, but each requires different settings. The conditional compilation solves this, but only a part. Currently I duplicate the source folder and modify the topics in the res folder. Would have some way to keep only one source folder and apply a theme to each build?
 

DonManfred

Expert
Licensed User
Longtime User
What is so special on the different clients versions that you can not build with conditional compiling?
and modify the topics in the res folder
The resources are different?

You can use one Resource-folder for each of your customers using
B4X:
#additionalres: ..\res_hohnsmith
This will use a folder named
res_hohnsmith in your PROJECT dir (NOT inside objects\res-folder!)

This works with conditional compiling too
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
or put as much of the common stuff in code modules and put it in the shared modules path
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
where is the drawable folder now?

projectdir\Objects\res\drawable\*.*?

If yes then move the folder to

projectsdir\res_hohnsmith\drawable\

The advantage of using the additionalres command is that you DONT NEED to set the files writeprotected
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
No...

It's in ..\res_hohnsmith\drawable\*.*
maybe i misinterpreted... you already did what i want suggest here i believe
The folder with the ressources is already projectdir\res_hohnsmith\?

I thought it was still inside the object folder
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
for icon you need to use a custombuildaction and copy the right icon into objects\res\drawable\ (The Icon MUST be in the "original res folder"!)

See here.

B4X:
#If JOHNSMITH
   #CustomBuildAction: 1, c:\windows\system32\cmd.exe, /c copy ..\res_hohnsmith\drawable\full_icon.png res\drawable\icon.png
#End If

If you find my answer useful please click on like.
 
Last edited:
Upvote 0
Top