Standalone App Settings > Android > Version Name

The place to discuss anything and everything about running your LiveCode on Android

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
KimD
Posts: 210
Joined: Wed Jul 08, 2015 5:51 am
Location: Wellington, New Zealand

Standalone App Settings > Android > Version Name

Post by KimD » Thu Apr 14, 2016 1:18 am

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 ;-)

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5679
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Standalone App Settings > Android > Version Name

Post by jacque » Thu Apr 14, 2016 8:44 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8169
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Standalone App Settings > Android > Version Name

Post by FourthWorld » Thu Apr 14, 2016 8:59 pm

I believe the cRevStandaloneSettings is stripped from the standalone build, so it's not available at runtime.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5679
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Standalone App Settings > Android > Version Name

Post by jacque » Thu Apr 14, 2016 9:14 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

KimD
Posts: 210
Joined: Wed Jul 08, 2015 5:51 am
Location: Wellington, New Zealand

Re: Standalone App Settings > Android > Version Name

Post by KimD » Thu Apr 14, 2016 9:35 pm

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?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5679
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Standalone App Settings > Android > Version Name

Post by jacque » Thu Apr 14, 2016 10:39 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

KimD
Posts: 210
Joined: Wed Jul 08, 2015 5:51 am
Location: Wellington, New Zealand

Re: Standalone App Settings > Android > Version Name

Post by KimD » Thu Apr 14, 2016 11:04 pm

Got it. Thanks Jacque.

KimD
Posts: 210
Joined: Wed Jul 08, 2015 5:51 am
Location: Wellington, New Zealand

Re: Standalone App Settings > Android > Version Name

Post by KimD » Thu Apr 21, 2016 9:40 pm

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"

Post Reply

Return to “Android Deployment”