Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

When you get an app from the play store, the apps are always given in this format (For example):

https://play.google.com/store/apps/details?id=com.king.candycrushsaga

I'm not interested in the main URL, and just the app name, so I get:

com.king.candycrushsaga

I know that this is the actual app name, that is not the friendly name shown on the app drawer or in the play store, but the com. part always confused me. I know what the other parts of the name are for (com.PublisherName.AppName), but what is the point of the com. at the start?

share|improve this question
    
It's not always a "com.", see play.google.com/store/apps/details?id=org.projectmaxs.main or play.google.com/store/apps/details?id=uk.co.nationalrail.google for a couple of examples of something else being there –  GAThrawn Apr 2 at 17:24

1 Answer 1

up vote 30 down vote accepted

The naming convention is derived from the Java standards, and is comparable to an URL, but in reverse. The key here is that it has to be unique, that's why it's so specific.

In you example, com is the main category which is comparable to a Top Level Domain, which can also be com. Next is the company name king, which can be compared to a domain name, and finally candycrushsaga, which could be a subdomain. Since the names have to be unique, this naming schema is quite usual, but can sometimes be divided even further by adding a subproject name to the end. For example King could separate games from other apps they've created by using the name com.king.games.candycrushsaga.

According to Java standards, the first component has to be a valid top level domain (com, net, edu, gov, country-specific), but I remember also seeing package names that didn't respect the standard.

share|improve this answer
2  
Thanks for the answer - I think I get it now - if my site is GeorgesApps.com for example and I make a game called Ask Your Friends then it would be com.GeorgesApps.AskYourFriends –  George Apr 1 at 18:47
    
Yep , that's it –  onik Apr 1 at 18:49
5  
@GeorgeH but then, in lowercase: com.georgesapps.askyourfriends. –  Niek Haarman Apr 1 at 19:34
3  
@Onik I think it's also worth noting that it's very bad practice to use an URL that you don't own as your package name. That's why apps by King will start com.king, which is their domain name. This is the only reason the first part of the package name should be a valid internet TLD. –  Dan Hulme Apr 2 at 10:20
2  
@GeorgeH I understand. The point is, it's not just com.publishername, and the choice of com isn't arbitrary: it actually ought to be a domain the publisher owns. I didn't think that was clear in onik's answer. –  Dan Hulme Apr 2 at 22:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.