Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

build two version of same android app and install both on same device

Tags:

android

I need to build two version of same android app and install both on same device, i can achieve this by keeping two different projects (different package name),but it's pain full to manage both, rather than keeping two projects is there any better way to achieve this.

Sam.

like image 209
Sam Avatar asked Nov 06 '22 03:11

Sam


1 Answers

You can use a library, but you'll need to restructure your code quite a bit in order to do it.

Basically, write the code specific for one app in one project, and the code specific for another app in another project then write the code thats the same across both apps in a library and reference it.

Can I ask what your doing this for though? If your doing a "free" version of your app and a "paid" version there are a few other options as well. Like making a dummy app and checking for it's presence in the main app.

like image 173
Vizirship Avatar answered Nov 12 '22 20:11

Vizirship