In the editor you can set the "Application Version" - is there some way to read this version value from the app? Or do I have to maintain the number there as well?
Ha ha... Well, I didn't say it was a perfect solution, but I figured it would answer your question (I had run across that post before).
Ideally, in the future we might get something like Application.Version but for what you are doing, I would just set a global variable as suggested in the other thread.
Probably not the most elegant way, but you could define as first variable under Process_Globals one for the version info and assign it a value.
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim VersionNo As String :VersionNo = "0.9.42"
Alternatively you could set Major, Minor, and Revision separately in a type var.
You shouldn't be concerned about using any library. Even the core functionality if Basic4android is a library, that's how it is structured so it is easy to add functionality.
You shouldn't be concerned about using any library. Even the core functionality if Basic4android is a library, that's how it is structured so it is easy to add functionality.
Yeah, i guess what i meant was that i don't want to add unnecessary permissions - i assume most (if not all) libraries add extra permissions - and as a user i love apps which require few to no permissions.
No. Permissions are only added when needed. Permissions are tied to objects not libraries.
When you call:
B4X:
Dim o As x
then the permissions of x object are added to your application.
The permissions are listed in the documentation. In the case of PackageManager, no permissions are added.
I see.
But since you are there, there isn't a variable or something (that you've added) which reads the version number one has entered in the b4a interface?
No. The version you enter in the IDE is set in the manifest file. In some cases user need to manage the manifest file themselves. This means that it is not possible to rely on this value but rather the manifest value should be used.
Anyway using the PackageManager is a good solution and it doesn't add any permission. If you do not believe me you can just try it yourself.
Yes I know. Why are the german links at the top? Aren't most of us english reading? Shouldn't the German docs have a page of their own?
Doing a ctrl+f for 'permissions' doesn't hit anything.
No. The version you enter in the IDE is set in the manifest file. In some cases user need to manage the manifest file themselves. This means that it is not possible to rely on this value but rather the manifest value should be used.
Of course I believe you. I hope you don't think i suggested otherwise. You made this stuff, so I'm going to assume you generally know what you are talking about
Each object lists its permissions. For example here the permissions of the FTP object: Basic4android - Net
If there is no permission section then it means that the object doesn't add any permissions.
Can you read the actual manifest file from inside the app?