0

What is the naming convention for android apps?

I just kicked off my 1st cordova app and out of the box it is named com.example.hello..

If my app is called "guitars" can the id not just be that?

From: Android - Package Name convention

I understand the company name coming 1st.. but i don't follow why com is preceding it

3 Answers3

0

Android apps have always been named like this. It comes from Java naming. If you have an app named "guitars" it would show as com.john.guitars

Com = commercial application (just like .com, most people register their app as a com app)
First level = always the publishing entity's' name
Second level (optional) = sub-devison, group, or project name
Final level = product name
stefan_aus_hannover
  • 1,777
  • 12
  • 13
0

In Android, in order to get a unique identifier you need to put something that is unique to your app, and here comes your domain into place since there is only one domain with the same name, like email for example. This will help the device recognize your app. The reason for com at the beggining is because its an old convinient from java, it helps group apps in the same place. You can of course still do org.my.domain and it will work the same but will be in a different "folder" on the device.

So the naming convention is just your domain upside down + the name of the app, There for, guitars will be in the end if the name of the app is Guitars.

Shai
  • 318
  • 6
  • 15
0

The appId can be any string. So you can set it to whatever you want, including just "guitars". However, the appId must be unique on a device. If another app that is already installed has the appId as "guitars" then your app will not install. To help avoid this, Google recommends that you use a "reverse domain name". For companies that already own a domain this can help avoid name collisions since com.google is "owned" by Google and com.samsung is clearly from Samsung.

This practice comes from using reverse domain names for Java packages. See What is the significance of the reverse domain name for java package structure for an explanation.

Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268