The package naming convention in Android is:
com.organizationName.appName
But if the organizationName or the appName starts with a number or underscore, it becomes a invalid name, since android doesn't accept words that start with number or underscore.
For example:
com.1organizationName.appName
is invalid
What is the convention to rename this package?
In the official "Naming a Package" java documentation, it has the following statement:
In some cases, the internet domain name may not be a valid package
name. This can occur if the domain name contains a hyphen or other
special character, if the package name begins with a digit or other
character that is illegal to use as the beginning of a Java name, or
if the package name contains a reserved Java keyword, such as "int".
In this event, the suggested convention is to add an underscore.
So in your case, it would be com._1organizationname.appname
EDIT: Just found this in the Android docs:
A full Java-language-style package name for the application. The name
should be unique. The name may contain uppercase or lowercase letters
('A' through 'Z'), numbers, and underscores ('_'). However, individual
package name parts may only start with letters.
So apparently it's not quite Java-style. Unfortunately, it looks like your best bet in this case would in fact be to spell out the number, e.g. com.oneorganizationname.appname
.
The naming convention is merely to help you create a unique package name for the Play market. If you use your company's website address backwards (i.e. com.websitename.appname), then it's unlikely another app in the Play market will have it. You can name the package whatever you want so you can spell the number out to make it easier (com.oneOrganizationName.appName).
See here about the "package" attribute in the manifest:
A full Java-language-style package name for the application. The name
should be unique. The name may contain uppercase or lowercase letters
('A' through 'Z'), numbers, and underscores ('_'). However, individual
package name parts may only start with letters. To avoid conflicts
with other developers, you should use Internet domain ownership as the
basis for your package names (in reverse). For example, applications
published by Google start with com.google. You should also never use
the com.example namespace when publishing your applications.
The package name serves as a unique identifier for the application.
It's also the default name for the application process (see the
element's process process attribute) and the default
task affinity of an activity (see the element's
taskAffinity attribute).
you can try co.m_1organizationName.appName or co.m1organizationName.appName this way your package will not be absurd and the address will be more meaningful.
You know, it only costs like $5 to register a new domain name. Just register oneorganizationName.com and use that. You know it will be unique, you know it will be a valid package name, and now you know that phishers and spoofers won't be registering oneorganizationName.com for themselves to trick your customers.