Mustofa Rizwan
Mustofa Rizwan

Reputation: 10466

How to keep two version of an android application in the same device

Whenever I try to install the 2nd version, it says that it is going to replace all data from the previous version. I did the following things to avoid such situations:

  1. app names are different so .apk file name is also different
  2. package names are different

My app has a database. Do I need to have different database name for these two version ?

So, I would like to know, what I am doing wrong and what more should be done? I am using eclipse simulator at the moment.

Upvotes: 0

Views: 1816

Answers (2)

slund
slund

Reputation: 6397

Make sure that you have changed the package= in the AndroidManifest.xml

Upvotes: 0

DanielS
DanielS

Reputation: 555

You must have a different package name, there is no other way. I had 2 different versions of the same product (free & paid) and used: com.package.paid & com.package.free.

This means that nothing is shared between the 2 apps (DB included).

You can also use ANT scripts to build both apps from the same code base, I just changed it manually every time I needed to build a version.

Upvotes: 3

Related Questions