1. Are you ready for the Galaxy S20? Here is everything we know so far!

How do you name packages?

Discussion in 'Android Development' started by Z3R0115, Feb 6, 2011.

  1. Z3R0115

    Z3R0115 Newbie
    Thread Starter

    I Know your supposed to name them in a specific format but I don't understand it...Does it really even matter much?

    Can't seem to find any straight forward info on this online, thanks
     



    1. Download the Forums for Android™ app!


      Download

       
  2. cr5315

    cr5315 Android Enthusiast

    Let's say you are making an app the sends email and your name is Bob. You could put "com.bob.email". The package name is a way to identify your app from others, so you should make it specific to you. So for example, I make apps under the name BBA, so I would put "com.bba.email".
    Package names also don't need to have three parts to them. As long as they start with "com." they should be fine. You could have seven parts, or only two.

    Hope this helps explain it to you.
     
    Z3R0115 likes this.
  3. miXer

    miXer Android Enthusiast

    You don't need to start with com. You can have what ever you want as your package name, as long as it is at least two parts(part1.part2). The standard is two only use lowercase in package names.

    The package name is there to separate apps/programs from one another. Like on android: You can have several apps called Gallery for instance. This is because they have different package names. If they all had the same package name, then one app would have overwritten the other.
     
    Z3R0115 likes this.
  4. id0001

    id0001 Well-Known Member

    the format often is [country code (com/org/nl/en/us)].[company name].[project name]
     
    Z3R0115 likes this.
  5. Z3R0115

    Z3R0115 Newbie
    Thread Starter

    Hey thanks ALOT guys all your responses were very helpful +thanks for each of you ^-^

    and yes that clears up my confusion here thanks guys
     
  6. pietjuhhh1990

    pietjuhhh1990 Well-Known Member

    One thing about the packagename is importent.
    Evry new class you make should be in the same namespace to make it easy for you
     
Loading...
Similar Threads - name packages
  1. JB_User
    Replies:
    10
    Views:
    377
  2. dksksks2
    Replies:
    0
    Views:
    390
  3. halfbeing
    Replies:
    6
    Views:
    440
  4. Joseph_1
    Replies:
    4
    Views:
    713
  5. Myroslav
    Replies:
    13
    Views:
    718
  6. App Update
    Replies:
    0
    Views:
    413
  7. bbbl67
    Replies:
    7
    Views:
    673
  8. Motorhomer14
    Replies:
    0
    Views:
    727
  9. Mehak Gul
    Replies:
    0
    Views:
    302
  10. Rob
    Replies:
    2
    Views:
    13,725

Share This Page

Loading...