Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Valid name for Android Package Name

If I own a domain name like e.g Dan-Carlos.com

Does the andoid package name allow use like com.dan-carlos.com?

I have not tried using it but I am curious if anyone tried domain name with hyphen '-' in it.

like image 373
anwarma Avatar asked Jun 08 '12 18:06

anwarma


People also ask

What should be the package name?

Package names are written in all lower case to avoid conflict with the names of classes or interfaces. Companies use their reversed Internet domain name to begin their package names—for example, com. example.

How do I find my Android package name?

One method to look up an app's package name is to find the app in the Google Play app store using a web browser. The package name will be listed at the end of the URL after the '? id='.

What is package name in APK?

The APK Package Name is the directory of the app on the Android operating system, as well as the address of the app on the Google Play Store. Therefore, the APK Package Name must be unique (multiple apps with the same APK Package Name cannot be published).

What is a valid Java package name?

Java conventions typically recommend package names to be a website address (like your company's) in reverse, e.g. com. google. foo. More on naming conventions here. Follow this answer to receive notifications.


2 Answers

refer to my working years and some web pages like this you should replace "-" dashes with "_" underline.

if web site is : dan-carlos.com

package name is : com.dan_carlos

like image 106
Maziar Aboualizadehbehbahani Avatar answered Oct 21 '22 00:10

Maziar Aboualizadehbehbahani


According to the 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, sadly you can't use anything else except for English letters, digits, the character "." and the character "_" .

like image 41
android developer Avatar answered Oct 21 '22 00:10

android developer