Android Question How to have two versions of an app on my device?

Misterbates

Active Member
Licensed User
First post, please be gentle.

I've been trying to work out the best way to have two versions of my App on my Android device:
1) The current development (unstable) version
2) The current release (stable) version

I understand that the package name (part of the build configuration) must be unique and that it's only possible to have one version of a package installed on my device at any one time.

So I'm currently wondering if it's possible to use conditional compilation and a #CustomBuildAction to append (e.g.) ".dev" to the package name when the compilation mode is set to Debug (using the DEBUG conditional compilation identifier)?

How have others done this for apps that they are developing that they also use themselves?

Thanks,
Misterbates
 

Misterbates

Active Member
Licensed User
Have 2 different package name.. Thats the only solution i can think of

Thanks! Is there any way to use the package name I entered as the stable package name, then use conditional compilation to add .Dev or similar at compile time if debugging is enabled?

Apologies, but being a compete newbie and not at all familiar with Java on android or the compilation process, I don't know if it's possible and if it is, how I could achieve it... Any pointers would be much appreciated.
 
Last edited:
Upvote 0

ronell

Well-Known Member
Licensed User
Longtime User
, afaik you can use any package name you want, e.g.
Com.ronell.unstable <- use this package name when developing the app
Then change to
Com.ronell.stable if you think your app is ready to be published
You now have 2 same apps with diff version
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
You can use two Build-Configurations. Each one will have it´s own packagename. You can use the commandlinebuilder to create boths apps from within a batch for ex.
 
Upvote 0

Misterbates

Active Member
Licensed User
I explored the build configurations and in so doing, came across the manifest editor, which I thought would be able to provide an easy way to append .dev to my package using DEBUG conditional compilation.

I tried to use:
B4X:
AddReplacement($PACKAGE$, $PACKAGE$.dev)
but the resulting manifest contains the first line below when what I wanted was the second line
B4X:
package="$PACKAGE$.dev"
package="ScB.MisterBates.IntervalsPlus.dev"

Can I use the manifest editor to append .dev to the package name?
 
Upvote 0

Misterbates

Active Member
Licensed User
You should use two build configurations. The build configurations were designed specifically for this scenario.

Thanks. Was hoping not to have to think about changing the config, but I guess on reflection this will prompt me to document/follow a well-defined process to create a stable build (including adjusting the config, archiving the build in case needed later to debug user issues etc.)
 
Upvote 0
Top