1

While developing android apps, I found out that why previous apps was replaced when I installed another app using apk file.

The apps have different names, labels, but the same package name. Is that ok?

4
  • 2
    afaik package name should be unique. in the directory (named after package) all data are being stored. also, the APK is internally stored as packagename.apk (or something) Commented Apr 16, 2013 at 11:56
  • 2
    Giving it the same package name means that it will overwrite the previous version when you install it. I.e different apps need different package names. Commented Apr 16, 2013 at 11:57
  • problem is your package name.. it should be unique. and also it will replace if you are developed that app. else it wont replace . instead it will show error in console. like different key signatures. Commented Apr 16, 2013 at 12:05
  • Package name is identification of an application for a device, Google Play uses package as id of an application. So check your package name, they should be diffrent. And you installed another application only when both applications signed with same key... otherwise when you install another app, OS gives you the error.. Commented Apr 16, 2013 at 12:06

3 Answers 3

4

take a look at your package name. The package name must be unique. May thats your problem

Sign up to request clarification or add additional context in comments.

Comments

2

The apps have different names, labels, but the same package name. Is that ok?

No, it's not Ok. The package name is how the system uniquely identifies one app.

for example you should/could your packages name as:

  • com.jrgalia.app_1_name
  • com.jrgalia.app_2_name
  • com.jrgalia.app_3_name

etc...

Comments

2

To be very specific as why your app got replaced. All applications will be stored in /data/data/package_name

If you do adb install then the folder and its content will be replaced by your new operation, that is why while uploading to google play it makes sure package names are unique.

enter image description here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.