168

I would like to know whether it is technically possible, not whether it is easy or not, to change the actual package name of an Android app that is on Google Play. What I mean by package name is the name that will show up in the URL. Please, can anyone tell me why this is / is not possible? Thanks!

0xCursor
  • 2,242
  • 4
  • 15
  • 33
user2426316
  • 7,131
  • 20
  • 52
  • 83

7 Answers7

161

From Dianne Hackborn:

Things That Cannot Change:

The most obvious and visible of these is the “manifest package name,” the unique name you give to your application in its AndroidManifest.xml. The name uses a Java-language-style naming convention, with Internet domain ownership helping to avoid name collisions. For example, since Google owns the domain “google.com”, the manifest package names of all of our applications should start with “com.google.” It’s important for developers to follow this convention in order to avoid conflicts with other developers.

Once you publish your application under its manifest package name, this is the unique identity of the application forever more. Switching to a different name results in an entirely new application, one that can’t be installed as an update to the existing application.

More on things you cannot change here

Regarding your question on the URL from Google Play, the package defined there is linked to the app's fully qualified package you have in your AndroidManifest.xml file. More on Google Play's link formats here.

Community
  • 1
  • 1
Voicu
  • 16,921
  • 10
  • 60
  • 69
  • 10
    worth mentioning, since I looked around for this - you can change the package name *of the actual package in java*, and basically everywhere else besides in the manifest. the one in the manifest is more or less independent of the one everywhere else. – lahwran Apr 05 '16 at 04:31
  • 3
    @lahwran I ran into issues with Android Studio building properly when they didn't match - the issues went away when they did. – datu-puti Nov 09 '17 at 07:56
  • Interesting, I wonder if this has changed. I wouldn't be surprised if it worked once to make them different but was never supported. – lahwran Nov 10 '17 at 19:02
  • 1
    @Voicu is it possible to change the package name if we uploaded first build in beta mode and no want to change package at release mode – Tejas Pandya Apr 26 '18 at 07:19
  • so what happens if i have a paid version along with a free version with the same package name ? both on the play store as different apps – Femn Dharamshi Nov 14 '18 at 15:10
  • But why doesn't Google allow this? I can see many reasons why someone might want to update the ApplicationID on Play store. This is a limitation that makes no sense. I would even pay for a change! Also it would probably be an easy change to implement for Google. Just redirect any requests in the Play Store to the new app ID, + handle updates on Android device. – Luzian Aug 25 '19 at 20:54
  • 1
    is there a way to change it BEFORE publishing? – Adam B Jan 06 '22 at 20:19
96

Nope, you cannot just change it, you would have to upload a new package as a new app. Have a look at the Google's app Talk, its name was changed to Hangouts, but the package name is still com.google.android.talk. Because it is not doable :) Cheers.

LuckyMe
  • 3,820
  • 2
  • 27
  • 35
29

As far as I can tell what you could do is "retire" your previous app and redirect all users to your new app. This procedure is not supported by Google (tsk... tsk...), but it could be implemented in four steps:

  1. Change the current application to show a message to the users about the upgrade and redirect them to the new app listing. Probably a full screen message would do with some friendly text. This message could be triggered remotely ideally, but a cut-off date can be used too. (But then that will be a hard deadline for you, so be careful... ;))

  2. Release the modified old app as an upgrade, maybe with some feature upgrades/bug fixes too, to "sweeten the deal" to the users. Still there is no guarantee that all users will upgrade, but probably the majority will do.

  3. Prepare your new app with the updated package name and upload it to the store, then trigger the message in the old app (or just wait until it expires, if that was your choice).

  4. Unpublish the old app in Play Store to avoid any new installs. Unpublishing an app doesn't mean the users who already installed it won't have access to it anymore, but at least the potential new users won't find it on the market.

Not ideal and can be annoying to the users, sometimes even impossible to implement due to the status/possibilities of the app. But since Google left us no choice this is the only way to migrate the users of the old apps to a "new" one (even if it is not really new). Not to mention that if you don't have access to the sources and code signing details for the old app then all you could do is hoping that he users will notice the new app...

If anybody figured out a better way by all means: please do tell.

Marcin Koziński
  • 10,835
  • 3
  • 47
  • 61
racs
  • 3,974
  • 2
  • 23
  • 26
  • 6
    While this is the best one can do to get the new app installed, one must remember that old app will still reside on the device - since this is a not really an upgrade, but new install (unless user manually uninstalls previous one). So you will have old app as well as new app on the device and probably with the same launcher icons - confusing the user about - old vs new one. – Jasper Jul 13 '15 at 11:17
  • 2
    You are right, unfortunately it is not possible to remove the old app as part of the install process of the new app. However, it might be possible to detect the presence of the old app and warn the user to remove it. This can be done either on startup of the new app or in the post install event handler (http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_ADDED). – racs Jul 13 '15 at 21:36
  • 2
    Also, the old app could detect the presence of the new one and simply show a toast or so, then start the new one, and exit. – Moritz Both Jan 04 '17 at 12:15
8

No, you cannot change package name unless you're okay with publishing it as a new app in Play Store:

Once you publish your application under its manifest package name, this is the unique identity of the application forever more. Switching to a different name results in an entirely new application, one that can’t be installed as an update to the existing application. Android manual confirms it as well here:

Caution: Once you publish your application, you cannot change the package name. The package name defines your application's identity, so if you change it, then it is considered to be a different application and users of the previous version cannot update to the new version. If you're okay with publishing new version of your app as a completely new entity, you can do it of course - just remove old app from Play Store (if you want) and publish new one, with different package name.

Rahul Sethi
  • 83
  • 2
  • 6
3

If you are referring to com.example.app, no I understand you can't it would be considered a new app

ah008a
  • 1,115
  • 6
  • 11
3

Never, you can't do it since package name is the unique name Identifier for your app.....

Shubhamhackz
  • 7,333
  • 7
  • 50
  • 71
3

Complete guide : https://developer.android.com/studio/build/application-id.html

As per Android official Blogs : https://android-developers.googleblog.com/2011/06/things-that-cannot-change.html

We can say that:

  • If the manifest package name has changed, the new application will be installed alongside the old application, so they both co-exist on the user’s device at the same time.

  • If the signing certificate changes, trying to install the new application on to the device will fail until the old version is uninstalled.

As per Google App Update check list : https://support.google.com/googleplay/android-developer/answer/113476?hl=en

Update your apps

Prepare your APK

When you're ready to make changes to your APK, make sure to update your app’s version code as well so that existing users will receive your update.

Use the following checklist to make sure your new APK is ready to update your existing users:

  • The package name of the updated APK needs to be the same as the current version.
  • The version code needs to be greater than that current version. Learn more about versioning your applications.
  • The updated APK needs to be signed with the same signature as the current version.

To verify that your APK is using the same certification as the previous version, you can run the following command on both APKs and compare the results:

$ jarsigner -verify -verbose -certs my_application.apk

If the results are identical, you’re using the same key and are ready to continue. If the results are different, you will need to re-sign the APK with the correct key.

Learn more about signing your applications

Upload your APK Once your APK is ready, you can create a new release.

Vinayak
  • 6,056
  • 1
  • 32
  • 30