Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to name an Android application package for a site that does not begin with ".com" [closed]

I have been using this beginner's tutorial (https://developer.android.com/training/basics/firstapp/creating-project) on Android application development to help me create my first Android application.

For the "Configure your project" window, the tutorial suggests using "com.example.myfirstapp" as a package name. (Obviously, my real app would not be called "myfirstapp": this is just an example.)

However, I already own a website with a subdomain and a domain other than ".com". I was actually hoping to use a website with a URL like "https://myfirstapp.github.io/" (GitHub Pages).

For my Android application, should I name the package: "io.github.myfirstapp"? Or should it be "io.github.myfirstapp.myfirstapp" since the first "myfirstapp" is part of the website name? Or should it not be that at all, since I don't own "GitHub"... I'm a little confused.

like image 698
Riyaad Azad Avatar asked Dec 06 '25 19:12

Riyaad Azad


2 Answers

The package name is used for unique for your application. Android uses the package name to determine if the application has been installed or not. The general naming conventions can be like:

com.organizationname.applicationname

eg:

com.facebook.katana (Facebook app)

Or

com.orgnizationname

eg: com.whatsapp (Whatsapp messenger)

like image 101
Deep Patel Avatar answered Dec 09 '25 13:12

Deep Patel


a best practice for defining a package name is to use a reverse domain like you just mentioned : com.android.example. If you have a different top-level-domain it is also ok.

As a company you could use somethin like com.companyname.appname or even use another subdomain like com.companyname.customername.appname

like image 27
Pynnie Avatar answered Dec 09 '25 11:12

Pynnie