I have one application which is already live on google play named 'Moodlytics'.
https://play.google.com/store/apps/details?id=AnantApps.Moodlytics&hl=en
Currently its package name is 'AnantApps.Moodlytics'.
(I know its not good practice to use capital letters for package name)
Now I am going to give an update to my application.
So my question is : Can I use 'anantApps.moodlytics' (all with small letters) as package name instead of the original one? Will current live application will be affected by this or not?
No you can't, look here: http://android-developers.blogspot.nl/2011/06/things-that-cannot-change.html
Because the package name is an unique name of you package and android cannot determine if it belongs to your older package name. And so it treats it like if it were another app.
Unfortunately, you cannot "update" your application with a different package name. The package name of an application is case sensitive.
Once it's published, you can't do anything about it.
See : http://android-developers.blogspot.fr/2011/06/things-that-cannot-change.html
Related
Might there be any issues in having a 2 part package name rather than the prescribed 3 part com.example.appname?
For instance, my app and company name are both named adamsapp. Ie:the package name would be app.adamsapp.
I do not see any documentation from Android or the Play Store that warn against such use of a package name. I'm currently using this convention in both Android Studio and Firebase without any warning or error messages.
According to Android documentation, You can use application id as follows
It must have at least two segments (one or more dots).
Each segment must start with a letter.
All characters must be alphanumeric or an underscore [a-zA-Z0-9_].
This means you can also use 2 part package name like app.adamsapp in your application. There will be no problem except uniqueness. Anyway, due to this issue, you cant use _ as starting of the package name
I'm thinking of taking the package name com.mangoapps.appname, but my question is, can someone else also use the prefix "com.mangoapps"?
Since I want to create a series of apps, I want a unique prefix "com.mangoapps".
And another question, how do I know if someone else is already using this package name as prefix?
Is there need of any relation between package name and developer's name?
There is no way to guarantee uniqueness. Anyone can do the same as you, that is just type in the name as packagename.
Things you can do to insure people wont do that, is to take (the reverse) of a domain you own. So if mangoapps.com is yours, there will probably be no one taking that packagename. And if you don't own the domain, you probably don't want to pick the name, as the owner might use it as default.
Because of this, there is also no way to know if someone uses that packagename. There might be a theoretical way to, for instance, check it for one place (e.g. some store, some collection of programs, etc), but I know of no such method for the play store.
There is no need for a relation between your name and the package name. The relation, if any, is with the name and a domain name, although it is not mandatory.
The package names should be based on a domain name that you control or have permission to use - that way ideally you have final say over which packages exist. What is your affiliation with mangoapps.com ?
note that in the real world none of this is enforced except by etiquette.
1) Yes, others can use the same prefix. Generally speaking, the prefix should be the reverse of your domain but it doesn't have to be, it can be anything. The prefix isn't visible to others so you could for example use com.SameerThigale if you don't have any other suitable domain to use.
2) They may already be doing so and there is no way to tell. However it doesn't really matter. All that needs to be unique (if you want to upload to the Play Store) is your prefix plus appname, i.e the complete package name. By choosing a prefix that relates in some way to you, you effectively eliminate the likelihood of conflicting with others.
3) There need be no relation between the package name and yourself. The package name is just a unique identifier for your application.
Sealing Packages within a JAR says
Packages within JAR files can be optionally sealed, which means that all classes defined in that package must be archived in the same JAR file.
So if your JAR is sealed and appears early on the CLASSPATH, then you can be sure that no other jars will be able to include classes in your package that have privileged access to package-private members.
Yes someone else can also use the prefix though the people won't do it in general as the name of their company is used after com prefix.
Its a part of url so you can always append to the url itself and search on google play
As I stated in the first point the developer/organization name is part of the package name itself.
i.e. com.mangoapps.appname
com -> company
mangoapps -> name of the company
appname -> name of the specific application that user will search on play store
There is an application (already published to the Play Store) that has package name, that doesn't fully conform to the Java naming convention (like CompanyName.ApplicationName).
Today, I was unable to publish updated version to the Play Store because the Developer Console complains about bad package name of the uploaded APK. Existing package name only contains letters and does contain a dot, so the only reason for rejecting it that I can think of is package name starting with the upper-case letter. It does match the previously used package name.
Can it be the case? Are there are some recently implemented restrictions for package name?
edit
The error I'm getting is
The package name of your apk (CompanyName.ApplicationName) is invalid. Package
names must start with a character and can only contain characters,
numbers, underscores and dots. They must have at least one dot, cannot
end with a dot, and cannot contain any runs of more than one
consecutive dot.
I had same problem. Upload your apk in the new Developer Console.
You need 3 parts like org.meredrica.demo in your classpath to be compatible with android guidelines.
also you want to make it all lowercase, since they are case sensitive and capital names like that indicate classes (at least by convention, i'm not sure if its technically enforced)
So if i see something like CompanyName.ApplicationName I expect a class called CompanyName that contains a subclass ApplicationName.
You also might want to run android lint on your project.
I had the same problem while updating the apk file for an app with a package name of the form Aaa.Bbb.Ccc.Ddd, and Leon's solution worked. Though I did not understand it when I first read it.
What he meant is, in Google Play Android Developer Console, click the "Try the new design" button at the top right (which points to play.google.com/apps/publish/v2) to switch the web interface to a new layout. Uploading the apk in the new web UI works for me.
I want to change the package name for an app which is not yet published in the Market. Is there a way to use the new package name as the uniqueId on Market/Play and while still using the old package name in my code?
Changing the package name in the manifest will change how Google Play reads your package name. You don't need to change the package name anywhere else to accomplish that. In Eclipse, the package name for classes can be changed independently (directly under src).
As zapl mentions, you may need to handle a few manual items if your application package name differs from that of the classes within (shortcuts that assume everything is in the same package don't always work in that case). For example, using ".classname" may need to change to a fully qualified classname in the manifest and elsewhere.
If you're looking for a way to change the package name to be different in Google Play than it is in the manifest, then no you can't (it wouldn't be a good idea anyway). You can, however, use library projects to create a new app with the new package name without changing the original code or manifest. Minimal code/xml would need to be written.
Hope the question is clear enough. I don’t find something appropriate here or somewhere in the web which explains me why is it not possible. Maybe some of you can help me out?
It’s a general question with no problem in background (however you can always change the name of the package to avoid this) but I want to understand the idea behind this.
[Update]
Maybe I got a wrong expression about the package name? I think a package name is used to create logical units together. So, e.g. I check a slider and a checkbox alone I create a package name like de.test to put these projects to the same package name. And if I create some customer project I use a package name like de.company for all my projects. But if it’s the package name only for create a unique modifier this though is wrong…
The simple explanation is that the package name represents the unique identifier for the application. Its given in the google documentation for mainfest file
Here is the link and a line from that page. This link will also give you more idea.
It names the Java package for the application. The package name serves
as a unique identifier for the application.