App title, package name, app label

positrom2

Active Member
Licensed User
Longtime User
Hi,
could somebody define for me how the
Application title (displayed on top of the phone screen), the "package name", the "application label", and the Windows filename are interrelated or set? For instance, I don't know how to change the title bar displayed on top of the phone screen.

And how can I obtain a different .apk filename in order to keep a previous version?

Thanks, positrom2

N.B: I was having a lot of trouble keeping track of modified versions... I am heavily missing the "Save as" ... in the IDE.
 

admac231

Active Member
Licensed User
Longtime User
Okay.

Package Name - This is the lowest level name if you will. Most users will never really see it. They usually look like:
B4X:
com.mycompany.myapp
The naming convention is supposed to be TopLevelDomain.SubDomain[x however many].AppName. So lets take one of my apps for example. My website is ayedroid.com and I have an app called Status Via. So it would break down like this:
B4X:
Top Level Domain - com
Sub Domain - ayedroid
App Name - statusvia
so alltogether my package name is:
B4X:
com.ayedroid.statusvia
If you apply it to a much bigger scale it makes more sense e.g a business in America wants a sales app and their Italian counterparts want the same. Rather than have 2 completely different names they would have
B4X:
com.businessrus.sales
and
it.businessrus.sales
On the whole it keeps everything much more organised. Additionally, if named correctly you can use the package name to manipulate and take advantage of file structures - although that's not something I know a lot about.

Important to note, you should always use only lowercase for the package name.


Application label - This is simply the text that is shown to the user for your app e.g in the app drawer, in the uninstall menu e.t.c

Windows File Name (.b4a) - This is your project file. It ties together all your bits off code into a lovely package. As you can imagine, it is exclusive to Basic4android but every IDE does something identical.

Application Title Activity Title - This is quite different to the rest of these. It is part of the program rather than the filenames. If you want to change it you can either do it manually in the designer or use:
B4X:
Activity.Title = "New Title"


I've just realised how long this turned out to be. I hope the wall of text doesn't put you off!
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
In a nutshell:

The application title is changed in the designer (see Shot.jpg)

The package name is the UNIQUE name for your app, this name will be used by the Android Market for example (if you upload it to it), something like:

com.myawesomeapp.free

The application label is the name you will see under the launcher icon in your device.

Regarding changing the .apk name, you will have to do that manually since currently there's no option to do it automatically. Let's say that you create a project named "AwesomeApp", if you check the folder for your project you will see a "AwesomeApp.b4a", renaming that file will generate a different apk.

If you have more questions, you can read THIS document.
 

Attachments

  • Shot.jpg
    Shot.jpg
    47 KB · Views: 1,426
Upvote 0

joseluis

Active Member
Licensed User
Longtime User
I never saw this information joined together before. Good job! I've rated the thread 5 stars.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
As a personal preference, in my case I found it easier if I keep different projects in their own separate folders and I also like to give the project the same name as the folder in which it resides whenever possible. In other words, when I look at the folder name, I know what I have inside.
 
Upvote 0

rfresh

Well-Known Member
Licensed User
Longtime User
I wish we had a File Save As feature. I have another project lined up that is very much like my current one and I'd like to be able to just do a file (project ) save as and create a second copy of my current project with a different name of course.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
This is how I do it and it works:
1. Make a copy of the whole project folder you want to clone. Give it a new name
2. Open the folder and rename the .b4a project file to something other that its current name.
3. Open the new project that you just renamed. In the IDE, change its label and its package name. You can even change its icon. You got yourself a new project.
 
Upvote 0
Top