1

I am building an Android App. Is that OK to use two words as package name?

For example:

com.myapp
com.puzzlegame
com.dingdong

What is the reason behind using three words as a package name?

For example:

com.myapp.android
com.puzzlegame.something
com.dingdong.pingpong

Thanks!!!

Stack Overflow
  • 1
  • 5
  • 23
  • 51

2 Answers2

4

You could use the two names as well:

And although the application ID looks like a traditional Java package name, the naming rules for the application ID are a bit more restrictive:

It must have at least two segments (one or more dots).
Each segment must start with a letter.
All characters must be alphanumeric or an underscore [a-zA-Z0-9_].

Check the official doc for more info:

For more information please visit this link: Set the application ID

AskNilesh
  • 67,701
  • 16
  • 123
  • 163
Prajwal Waingankar
  • 2,534
  • 2
  • 13
  • 20
1

The package name is traditionally a reverse domain name with the application name as an added segment. When you create a sample android project, the package name is usually com.example.app. This is assuming that your domain name is example.com and your application name is app so the reverse will end up being com.example.app

Rafsanjani
  • 4,352
  • 1
  • 14
  • 21