Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 08, 2016, 03:58:32 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Android package name  (Read 2386 times)

miva2

  • Supporting Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 16
    • View Profile
    • Donate to Member
Android package name
« on: October 03, 2013, 04:52:27 PM »
I'd like to finally contribute to NANY this year and am thinking of making a simple android app...or two.
I know some java but don't know much about android yet.

Before starting my app, I need to give it a package name.
Which, if uploaded on google play, must be a unique identifier.
Android package names follow the Java package name convention. Usually this is the reverse domain name for the app. Default it is com.example.appname.
I've also seen e-mail adresses being used like com.domain.name.appname.
I'm not planning to get a domain for my apps and don't like to use my email address.
It's just a convention and I believe anything works as long as it is unique and follows the rules(about hyphens and caps and all) but I'd like to use a good convention that I can use in the future.

Currently I have: miva2.apps.appname
with "miva2.apps." litterally and "appname" replaced by the actual app name ofcourse.

Is this good? Any suggestions? Any things I need to know about package names?
I'd just like to know the opinion of people here :) Good luck to other NANY contestants!

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Android package name
« Reply #1 on: October 03, 2013, 06:37:46 PM »
May be you will find the following of some use:

  An answer to "Android - Package Name convention" on StackOverflow

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: Android package name
« Reply #2 on: October 03, 2013, 07:44:48 PM »
The idea of using a domain name in the Java package name convention for widely/publicly distributed packages was to  was to help ensure that distributed packages would have unique names by piggy-backing on the domain name system of ownership of names.  Microsoft's COM used GUIDs to create unique names for components; Java's convention is much friendlier.

I'd suggest using an email address for the base of your package namespace. If you don't want to use your real email address, create a dummy account somewhere (gmail, yahoo, whatever) and use that.

Or maybe mouser might consent to allowing the use of "com.donationcoder.your-userid" as a Java package namespace convention for DC contributors?

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,783
    • View Profile
    • Donate to Member
Re: Android package name
« Reply #3 on: October 04, 2013, 01:33:16 AM »
Following the (standardized) suggestion that ewemoa posted, I'd go for com.miva2.<apptype>.<appname>, just like a Java classpackage.
If it's specifically community/freeware opensource software (OSS/FOSS) it could use org instead of com.

Using DonationCoder in your packagename would suggest you either 'work' for DonationCoder, or made it specifically for DonationCoder, both of which aren't true (afaics).

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 7,716
    • View Profile
    • The Blog of Deozaan
    • Read more about this member.
    • Donate to Member
Re: Android package name
« Reply #4 on: October 04, 2013, 05:52:02 AM »
Using DonationCoder in your packagename would suggest you either 'work' for DonationCoder, or made it specifically for DonationCoder, both of which aren't true (afaics).

It would be made specifically for DonationCoder if it was made for NANY. Sort of.


miva2

  • Supporting Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 16
    • View Profile
    • Donate to Member
Re: Android package name
« Reply #5 on: October 04, 2013, 02:16:18 PM »
Thanks for all the fast replies!

Ewemoa, yeah I saw that thread. Thought I'd ask again here to see what DC members specifically think ;D

mwb1100, I could use my gmail address but that one is rarely used. My main address contains dashes and underscores.

Ath, I like that suggestion. What do you mean with apptype though? game/utility? I could put NANY in it so if I have any future entries, they can sit right in the same structure  ;D

I've been busy today so haven't really started yet. I'll do that one of these days. Thanks for all the replies!

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,783
    • View Profile
    • Donate to Member
Re: Android package name
« Reply #6 on: October 04, 2013, 03:37:18 PM »
Yeah, <apptype> could be util, gui, comm, nany etc.