Proper format of "Package Name"?

Highwinder

Active Member
Licensed User
Longtime User
I am getting ready to release my app to the Market.

In preparation for this, I have been looking for information in the proper way to configure my project. However I am having a hard time finding complete/descriptive information on the proper format or "Android way" for the following:

1. "Package Name" (anything goes? something.something.something? what?)

2. "Application Version" Integer and string (what's the difference/rules of these two fields?)

I cannot find (or have failed) complete information on the proper use of how these fields are supposed to be filled out in terms of Market/Android format requirements.

Sorry for such noobness, but I want to get this right and I thought I'd consult the gurus.

Thanks!

Highwinder the :sign0104:
 

Kevin

Well-Known Member
Licensed User
Longtime User
#1: I don't know of the exact format requirements but I wondered the same thing when I first started looking into Android development and one relatively common arrangement I saw was com.companyname.appname. So for example, com.microsoft.internetexplorer. Completely made up, but you get the idea. Generally the first two sections would always be the same for all of your apps and the last section (appname) would be unique to the app, whether it be a completely different app or a free and pro version (appnamepro or appnamefree). You also need to make sure you backup your private sign key. It cannot be re-created and if you lose it you will not be able to update an existing app without having to consider it to be a completely different app. This would likely confuse and frustrate customers. ;)

#2: Confused me at first as well, but actually quite simple:

Version Integer: Starts with 1 and for every new version you release of that app, increase it by 1. You cannot have two different versions of the same app with the same version integer.

Version String: Your typical version number. I don't know of any exact constraints on it, but 1.0 or 1.0.1 are acceptable.

Examples:
Integer String
1 ------ 1.0
2 ------ 1.0.1
3 ------ 1.2
4 ------ 2.0


Hope this helps!
 
Upvote 0

Highwinder

Active Member
Licensed User
Longtime User
THANK YOU SO MUCH, this is EXACTLY what I was looking for!

Because you corrected a few misconceptions on my part, and also since my app is fully developed and ready for publishing, you are a LIFESAVER!

:sign0104::D:sign0188:
 
Upvote 0

Highwinder

Active Member
Licensed User
Longtime User
Next stupid question - File Name

Ok, next stoopid question:

What is the proper file name format for the uploaded .APK file to the Market?

Thanks again!
 
Upvote 0

Highwinder

Active Member
Licensed User
Longtime User
File Name

Actually, I just found this from a post left by Erel (I've added the italics and accents myself for effect):

"The name of the APK should be the same as your main file name or result.apk if the main file name includes spaces or some other invalid character.

The name of the APK file is not really important.

Before you distribute it you can rename it as you like.
"

- Highwinder
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
#1: I don't know of the exact format requirements but I wondered the same thing when I first started looking into Android development and one relatively common arrangement I saw was com.companyname.appname. So for example, com.microsoft.internetexplorer.

Looking at Erel's tutorial apps, he uses the format companyname.b4a.appname, so that's the format I have been using.
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
Looking at Erel's tutorial apps, he uses the format companyname.b4a.appname, so that's the format I have been using.

Yeah, I've noticed that as well. I think the short answer is that it probably doesn't really matter much. I think that the way Erel does his naming for demo apps made for/with B4A makes sense, but for more traditional apps the other way mentioned above makes more sense to me.

Here's a bit more info from the Android dev site:

Package Name

This is the package namespace (following the same rules as for packages in the Java programming language) that you want all your source code to reside under. This also sets the package name under which the stub Activity is generated. Your package name must be unique across all packages installed on the Android system; for this reason, it's important to use a standard domain-style package for your applications. The example above uses the "com.example" namespace, which is a namespace reserved for example documentation — when you develop your own applications, you should use a namespace that's appropriate to your organization or entity.
and the example the above quote is referring to......

Package name: com.example.helloandroid (or your own private namespace)

So in that example, they are using com.entity(companyname).appname but recommend using example as the entity/company name when creating example projects.

Again, I don't think the exact naming convention is mission-critical so long as you are certain that your package name will be unique for every app you create, which is important.
 
Upvote 0

vb1992

Well-Known Member
Licensed User
Longtime User

Do know that what ever you name your package name,
will be used in the Android Market URL.
(and could possibly have an effect in organic SEO)


PACKAGE NAME: Garage.Sales.Nyc


Example URL: https://market.android.com/details?id=Garage.Sales.Nyc


This would also be the Url, you would be posting / sharing on Twitter/FB..etc
 
Upvote 0

mjtaryan

Active Member
Licensed User
Longtime User
All of this suggests that some way of managing versions seems to be advisable for those of us who are commericial producers and would be a very welcome addition to b4a.
 
Upvote 0
Top