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.
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)
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With