Page 1 of 1
Standalone App Settings > Android > Version Name
Posted: Thu Apr 14, 2016 1:18 am
by KimD
I'd like to display on screen, the value that I've entered into -
Standalone App Settings > Android > Version Name
Version Name must be stored in some system variable, but I can't work out what its called. Any help would be much appreciated.
Note - I know that I could do this manually, but that would mean entering the same value twice, with the associated risk of pilot error

Re: Standalone App Settings > Android > Version Name
Posted: Thu Apr 14, 2016 8:44 pm
by jacque
All the standalone settings are contained in a custom property set of the stack. To see the set, you need to turn on "LiveCode UI Elements in Lists" in the "View" menu. Then you can see the custom property set in the stack inspector, it's named "cRevStandaloneSettings". The two that are relevant to versioning are "android,version name" and "android,version code".
The version name is what the user sees, the version code is what Android uses to determine whether to notify of an available update.
Re: Standalone App Settings > Android > Version Name
Posted: Thu Apr 14, 2016 8:59 pm
by FourthWorld
I believe the cRevStandaloneSettings is stripped from the standalone build, so it's not available at runtime.
Re: Standalone App Settings > Android > Version Name
Posted: Thu Apr 14, 2016 9:14 pm
by jacque
FourthWorld wrote:I believe the cRevStandaloneSettings is stripped from the standalone build, so it's not available at runtime.
True, I guess I was thinking it was an in-development thing. I use it a lot to display the current build version in my stacks in a preOpenCard handler, and also to automate increasing the version numbers when starting a new revision. I also use it to populate a user-visible field before a build if necessary, since the version won't change once the standalone is built.
Re: Standalone App Settings > Android > Version Name
Posted: Thu Apr 14, 2016 9:35 pm
by KimD
Thanks both.
Jacque - Sorry, this aspect of Livecode is new to me.
- I activate VIEW > LIVECODE UI ELEMENTS LIST.
- This causes about 30 new stacks to appear in my project browser.
- One of those new stacks is "revStandaloneSettings". I don't see any "cRevStandalone Settings" stack.
- revStandaloneSettings has 8 custom properties defined in it, but these do NOT include "android,version name" or "android,version code".
What am I doing wrong?
Re: Standalone App Settings > Android > Version Name
Posted: Thu Apr 14, 2016 10:39 pm
by jacque
The settings are stored in your own stack, not any of the rev stacks, so you can ignore the project browser. After turning on "UI elements in lists", open the property inspector for your own stack.
In its custom properties pane, change the "Set" popdown button to the cRevStandaloneSettings property set. You'll see lots of properties for every option for every OS. For at least the android settings, only the ones you've changed seem to get stored, the default settings aren't listed there. If you don't see "android,version code" for example, make a slight change to it in standalone settings and it should show up the next time you reload the stack's inspector.
Once you're done with those properties, you'll want to uncheck viewing UI elements in lists or you'll go nuts seeing all those other rev stacks.
Re: Standalone App Settings > Android > Version Name
Posted: Thu Apr 14, 2016 11:04 pm
by KimD
Got it. Thanks Jacque.
Re: Standalone App Settings > Android > Version Name
Posted: Thu Apr 21, 2016 9:40 pm
by KimD
For anyone else that has the same question. I got it working by putting the following in preOpenStack -
put ("v"&the cRevStandaloneSettings["android,version name"] of this stack) into field "myField" of card "myCard"