I developed an application, under a namespace my friend and I used for joint ventures.
I’ve since migrated that app to my personal developer account, and must continue to use the same package name in the manifest file, else it will appear as a new app in the market, etc.
It seems odd to continue using that package name throughout the app (it was released in early 2010 when we first started learning, and the update I’m planning will be a complete rewrite), and I’d rather use my package prefix.
Can I leave the old package name in the AndroidManifest.xml file, but use the new package prefix throughout the app, and explicitly qualify any Activitys, Services or Receivers etc, in my manifest or will that cause some issue when I update the app?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
--> package="com.ouroldjointsite.theapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application>
<activity
--> android:name="uk.co.ataulmunim.theapp.TheAppActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
That is, the package attribute the only place the Play Store will check to see if an application is the same? I understand I’ll still have to sign it with the same key as before.
On a side note, is it discouraged to do this, even if it works?
Thanks!
You can change the Activity’s package name, just not the Application’s package name.
And yes, an Activity’s package name can be different than an application’s package name. It’s just that when you use the
Android New Project...wizard to start a new project, it just assumes that the Application’s package name will be the same as the Activity’s package name.