Android follows normal java package conventions plus here is an important snippet of text to read (this is important regarding the wide use of xml files while developing on android).
The reason for having it in reverse order is to do with the layout on the storage media. If you consider each period ('.') in the application name as a path separator, all applications from a publisher would sit together in the path hierarchy. So, for instance, packages from Adobe would be of the form:
com.adobe.reader (Adobe Reader)
com.adobe.photoshop (Adobe Photoshop)
com.adobe.ideas (Adobe Ideas)
[Note that this is just an illustration and these may not be the exact package names.]
These could internally be mapped (respectively) to:
The concept comes from Package Naming Conventions in Java, more about which can be read here:*
The package name is used for unique identification for your application.
Android uses the package name to determine if the application has been installed or not.
The general naming is:
Companies use their reversed Internet domain name to begin their package namesfor example, com.example.mypackage for a package named mypackage created by a programmer at example.com.
Name collisions that occur within a single company need to be handled by convention within that company, perhaps by including the region or the project name after the company name (for example, com.example.region.mypackage).
If you have a company domain www.example.com
Then you should use:
If you own a domain name like example.co.uk than it should be:
If you do not own a domain, you should then use your email address:
for [email protected] it should be:
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-division, group, or project name Final level = product name
For example the android launcher (home screen) is com.google.android.launcher
Generally the first 2 package "words" are your web address in reverse. (You'd have 3 here as convention, if you had a subdomain.)
So something stackoverflow produces would likely be in package com.stackoverflow.whatever.customname
something asp.net produces might be called net.asp.whatever.customname.omg.srsly
something from mysubdomain.toplevel.com would be com.toplevel.mysubdomain.whatever
Beyond that simple convention, the sky's the limit. This is an old linux convention for something that I cannot recall exactly...
But if your Android App is only for personal purpose or created by you alone, you can use:
From the Kotlin Android style guide:
Package names are all lowercase, with consecutive words simply concatenated together (no underscores).