Android Question Use package name from res file

Bel

Member
Licensed User
Hi
Can i place package name in values.xml or other file and use it in my project when i'm compiling it?
I have many client that i should be set different package name for each client
I use resource for make app for each client
If i can use packagename from xml so it is very good
 

DonManfred

Expert
Licensed User
Longtime User
you can use conditional compiling to use different res-folders.
You can also use a different buildconfiguration for each customer
 
Upvote 0

Bel

Member
Licensed User
I use #AditionalRes for include client res folder
Each client have a res folder that when i would like to compile it,copy to folder that define in AditionalRes
But i wouldn't like use buildconfiguration
If maybe instead of buildconfiguration,use packanamge from file it is good
Mahbe?
 
Upvote 0

Bel

Member
Licensed User
i edit .b4a file and see package name
If i edit it and compile it.
This is one way.
Other way i think that i can read only manifest file and change package name from manifest.xml and then compile,isn't is?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Other way i think that i can read only manifest file and change package name from manifest.xml and then compile,isn't is?
No. use buildconfigurations and compile with commandline.
In Manifesteditor you then use the buildconfiguraions to change the packagename.

See tutorials for buildconfiguration and ConditionalCompiling.
Search the forum too... I think it is already asked in past...
 
Upvote 0

Bel

Member
Licensed User
I know but i have client > 1000 and cannot use BuildConfiguration for each client
Can i use @string/package_name in manifest and save package name in strings.xml?
 
Upvote 0

Bel

Member
Licensed User
OK i decide to use BuildConfiguration
But Is it saving Version code for each Configuration?
Example when i select x client so version code set to latest version
 
Upvote 0

Bel

Member
Licensed User
Ok
Leave it
Other question
Look i create build configuration for each client and make folder for each that contains files
Now when i select build configuration for client number 2 so i need to select it's folder with below code
#AdditionalRes: ../client2

or when select client number 3 so add below code
#AdditionalRes: ../client3

Now my problem is , can i use buildconfiguration name instead of client2 (example : #AdditionalRes: ../buildconfigurationname)?
 
Upvote 0

Bel

Member
Licensed User
No No No
My client is above 1000 person
I cannot write IF condition for each client
I need to replace client3 with current build configuration name that when i compile it,autmate replace with build name
 
Upvote 0
Top