The package name
Any Android application (app) has a unique package name which identifies it on devices as well as on app markets such as CafeBazaar. In fact the package name is the identification tool for each app and is frequently called Application ID.
Rules for naming packages
The rules for naming packages in Android are the same as those in Java programming. Generally speaking, the name of a package would better go as:
In fact, the first two segments of the application package name are your website address written in reverse order. For example, if your website address is www.example.ir and you intend to build a flashlight app, then:
So, you would better name your application package as: ir.example.flashlight.
Naming a package, you would be able to use the following characters:
Capital and small English letters (‘A’ to ‘Z’ and ‘a’ to ‘z’)
English numbers (‘0’ to ‘9’)
In case your website address includes special characters such as dash (-) which you won’t be able to use in the package name, you are recommended to use underscore (‘_’) instead. For example, if the address is www.android-example.ir, you are recommended to use ir.android_example.flashlight as package name.
Your website address may contain some Java-reserved words, which you won’t be able to use as part of a package name. In that case, you are recommended to use underscore (‘_’) at one end of the word. For example, if your website address is www.example.int, since “int” is a Java-reserved word, you would preferably use int_.example.flashlight as package name.