I want to know that can I publish a new android app with existing app package name?
i.e I have a photo editor and its package name is com.myapps.photoeditor. now I want to make new version but i will publish VPN. so the new app will totally different.
VPN will be ok with existing package name com.myapps.photoeditor?
plz guide me
No, you cannot do this. Package name basically I unique ID for an app. When a package name is associated with an app and it is published over google play this is a unique ID for that app. You cannot publish new app with the same package name but you can update the app.
You can't publish two apps with same package name as google consider it as primary key but story doesn't end here. There are two things you can do:
you can update your app, here updates mean you can remove existing feature, you can add new feature, you can modify existing feature but you have to handle it properly.
But you want the new feature in a separate app then you should change clone your existing code and add new feature and change package name before publishing. (Not Recommended)
If you mean by package name as the applicationId in build.gradle, then the answer is NO. Your new VPN app will overwrite your existing Photo editor app.
If you mean by package name as the package name used by your source codes, then the answer is IT DEPENDS. YES you can use same package name in source code provided that you provide different name for applicationId. NO you cannot if you provide the same name for applicationId regardless of what you use as the package name used by your source codes.
Know the difference here: https://developer.android.com/studio/build/application-id
If you want to release a new app with applicationId (from app/build.gradle) same as any apps before, you can't do it.
If you want to update an existing app with complete new ideas or feature or name or type, having access to that app's signing keys and developer account, yes you can do it. Just release with version code greater than before
Related
What is the difference between changing package name vs applicationId to the final apk.
I know it is different for aspect of keeping source code, but lets say I got some app with package name a.b.c.d.
What will be the difference in the builded apk file
if I rename the a.b.c.d into q.w.e.r and then build the apk file
vs
change the applicationId into gradle with q.w.e.r
The package name is just to organize your code.
The applicationId, on the other hand, is used to identify your app in the Play Store. You will change this only if you plan to generate another app based on same code.
From docs (https://developer.android.com/studio/build/application-id.html):
When you create a new project in Android Studio, the applicationId
exactly matches the Java-style package name you chose during setup.
However, the application ID and package name are independent of each
other beyond this point. You can change your code's package name (your
code namespace) and it will not affect the application ID, and vice
versa (though, again, you should not change your application ID once
you publish your app). However, changing the package name has other
consequences you should be aware of, so see the section about
modifying the package name.
Some Android API like google map and firebase ask for your package name when you create the key. That package name they refer to is actually your applicationId. Yup Google insist on using the term package name for these API key. Don't get it confuse.
Taken from doc (https://developer.android.com/studio/build/configure-app-module#set_the_application_id):
"Note: The application ID used to be directly tied to your code's package name; so some Android APIs use the term "package name" in their method names and parameter names, but this is actually your application ID. For example, the Context.getPackageName() method returns your application ID. There's no need to ever share your code's true package name outside your app code."
Application id mostly used for:
Change the application ID for testing
Change the application ID for build variants
In this case, each build variant should be defined as a separate
product flavor. For each flavor inside the productFlavors {} block,
you can redefine the applicationId property, or you can instead append
a segment to the default application ID using applicationIdSuffix, as
shown here:
Every Android app has a unique application ID that looks like a Java
package name, such as com.example.myapp. This ID uniquely identifies
your app on the device and in Google Play Store. If you want to upload
a new version of your app, the application ID (and the certificate you
sign it with) must be the same as the original APK—if you change the
application ID, Google Play Store treats the APK as a completely
different app. So once you publish your app, you should never change
the application ID.
And package name is:
Although your project's package name matches the application ID by
default, you can change it. However, if you want to change your
package name, be aware that the package name (as defined by your
project directory structure) should always match the package attribute
in the AndroidManifest.xml file, as shown here:
The Android build tools use the package attribute for two things:
1- It applies this name as the namespace for your app's generated R.java
class.
Example: With the above manifest, the R class will be
com.example.myapp.R.
2- It uses it to resolve any relative class names
that are declared in the manifest file.
Example: With the above
manifest, an activity declared as is resolved to be
com.example.myapp.MainActivity.
Know more from Source
Once you upload the app on Play store you can't change the application id for that project , if you want to do then google play store consider as a different application.
In case of package name you can change it as you want.
I already have an app on android store and want to publish another.
The new one should have different name and images but all the back end is same.
Along with version number what are the things that I have to change to avoid any conflict? Do I have to change package names and all such stuff. Can some one please mention the things I have to change for publishing the new app.
The main identifier for Google Play is application package name. So you should change package name of your app. All other (version code, version name, images etc.) is relevant but is not necessary to be changed.
The final package that is used in your built .apk's manifest, and is
the package your app is known as on your device and in the Google Play
store, is the "application id".
The package that is used in your
source code to refer to your R class, and to resolve any relative
activity/service registrations, continues to be called the "package".
You should read about Configure Build Variants
Do I have to change package names and all such stuff.
A product flavor defines a customized version of the application build by the project. A single project can have different flavors which change the generated application.
android {
productFlavors {
devel {
applicationId "Your Id"
}
prod {
applicationId "Your Id 2"
}
}
}
First I uploaded one app with one package and now client changed the package name, in my app I used FB login and push notifications with the old app, so I have to change any thing in the FB developer either I have to create new account or I can use the old fb developer account and app_ID, with changing of the Package name.I am so much confused what I have to do, when I change the package name,please suggest some solution.
You also have to change the folder names to match the name of the new package.
For example the package:
xxx.yyy.zzz
Should correspond to the directory:
xxx/yyy/zzz
First , In android code, you will need to change package names in manifest xml and gradle mainly. use refractor for that.
secondly,
you mentioned that you used fb login and push notifications,
so for these, you will need to make some changes .
in Facebook developer app settings page, simple add your new package name to existing package list,
and for GCM push notifications, do the same on developer console and create new configuration files and add them to your project and everything will work fine.
I try to update customers App in Google Play, this is my first time I do this.
I created a certificate, it seems to be fine. The app was packaged with appcelerator titanium.
When I upload the app in store I get this message:
The name ofupdated APK-Package (gdp.app) must be the same with the package I want to replace (de.gdp)
File Name I upload is: GdP.apk
What do I have to change?
You changed the package name. You have to use the same package name as the original .apk.
Change your package name back to de.gdp .
More information:
http://developer.android.com/guide/topics/manifest/manifest-element.html
"I wont to replace (de.gdp)"
well, you cannot rename your package. If you change your package name the store recognizes it as a different app.
so you cannot update it with different package name.
Renaming your package to gdp.app will solve the issue.
If the package name and signing certificate do not match those of the existing version, Market will consider it a new application, publish it as such, and will not offer it to existing users as an update.
So, you have to maintain the same package name of previous build.
See this link: http://lokeshatandroid.blogspot.in/2012/07/upload-apk-into-android-market.html
During the upgrade of my android application, I changed the package name. But Android market doesn't allow to upload the changed package name application as an upgrade. If I upload the application as a new application, will the user have two applications on his/her device? How can I make sure that the user doesn't have to download the application again from scratch without reverting the change of my package name?
two package = two different application in market place.
Once you upload one app, its package should be same. Also, the key should be same.
Android market is only concerned about the package name in your manifest, not the actual packages name in the source.
You could try to give the old package name in the manifest attribute, then for activities give the new package name instead of relative (ie .MainActivity)
Like this:
<manifest package="your.old.package" ...>
...
<application android:name="your.new.package.MainActivity" ...>
Could work..
I plan to serve two versions of my app (paid/free) this way and using same project and code.
If you change the package name, it's treated as a separate app - not just in the market, but apk's in general will only 'replace' the same package name (and only if they're both signed with the same key).
Although it's possible to phase over to a new key by signing an intermediate package with both keys, there's currently no easy way to phase over the package name.
The best that can be done is this:
New apk version is signed with the same key, but has a different package name.
When installed, the new apk arranges to use the shared_prefs with the old package name.
The data is copied across to the new package name.
The new version requests that the old version is removed, and the user sees the uninstall dialog.
Note app data is usually kept here:
/data/data/pac.kage.name/
I haven't tried this, so I can't give anymore details yet. You may also be interested in my request for a seamless way of transitioning the package name.