Coding an Update Functionality for an LC App ?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Coding an Update Functionality for an LC App ?

Post by teriibi » Thu Jan 18, 2018 8:13 pm

Hi,

I`d like to know if there is way to code an update mechanism to release bugfix upgrades or add new features to an installed app ?

(let´s say on Android Plateform)
:roll: 8)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Coding an Update Functionality for an LC App ?

Post by dunbarx » Thu Jan 18, 2018 8:34 pm

Hi.

If you are adding new features I would think you would provide a new version of your app. Same with bug fixes. The executable does not change. But the working stack(s) would have to.

This assumes you do not have a mechanism to change scripts within the app itself, or to add or modify existing controls. All that would still have to be directed from some communication with the existing structure. Doable, I suppose. But I would shy away.

Craig Newman
Last edited by dunbarx on Fri Jan 19, 2018 3:43 am, edited 2 times in total.

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

Re: Coding an Update Functionality for an LC App ?

Post by FourthWorld » Thu Jan 18, 2018 8:42 pm

teriibi wrote:
Thu Jan 18, 2018 8:13 pm
Hi,

I`d like to know if there is way to code an update mechanism to release bugfix upgrades or add new features to an installed app ?

(let´s say on Android Plateform)
The recommended way to update mobile apps is through the app store.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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

Re: Coding an Update Functionality for an LC App ?

Post by jacque » Fri Jan 19, 2018 6:36 pm

The Play Store has automatic update mechanisms but if you plan to distribute outside the store, the easiest way to do it is to put a plain text file on a server that contains the latest version number. On launch your app checks that file to see if its own version is different from the one in the text file. If so, the app displays a dialog informing the user there is a new version a available and provides a link to the app online.

Another way is to use a launcher stack that opens the most current version of the actual mainstack from the server.

Note that the only way to update ios apps is via the Apple App Store.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Coding an Update Functionality for an LC App ?

Post by teriibi » Fri Jan 19, 2018 10:19 pm

thanks jacque, quite interesting info:
Can you detail this option ?

I though an Android Apk could only be downloaded and installed before it can open and run for the user ?
use a launcher stack that opens the most current version of the actual mainstack
:idea: :?:

Is this some kind of webapp...or...is the launcher actualy able to download install or update to a newer apk version of an already installed app on an Android Device ?

I´m asking this since some App builders (cant remember if it was about a Web type App) allows some
constant (rolling) updates with very little action from the end user, which I find real cool in a way

(not refering to google instant update tools)

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: Coding an Update Functionality for an LC App ?

Post by ghettocottage » Sat Jan 20, 2018 12:45 am

use a launcher stack that opens the most current version of the actual mainstack
+1 for this method. It is quite possibly even more simple than how it sounds.

1. take your app you are building. Do not export it as anything..just take the file you have been working on and put it on a webserver in a sub-folder called stacks (for example). So now your stack is at https://yourdomain.com/stacks/yourstack.livecode

2. create another stack. Name it "launcher". In the stack script put this:
//request the stack
go url "https://yourdomain.com/stacks/yourstack.livecode"
//close this window
close stack launcher
end openStack

3. now export the launcher as your app for whatever platform. when the launcher is opened, it will grab your stack on the server, open it, and close itself. your main stack will now be the one open.



you can update the stack on your server whenever you want. Whenever anyone opens that launcher, it will open your most recent version of your stack. It is really quite brilliant and a time-server on many levels.

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Coding an Update Functionality for an LC App ?

Post by teriibi » Sat Jan 20, 2018 1:06 am

:shock: :shock: :shock: :shock:
can´t believe what Im reading !!
got to give a serious test to this feature asap !

Thanks for advertising, I m sure it will be of great help :wink:

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Coding an Update Functionality for an LC App ?

Post by dunbarx » Sat Jan 20, 2018 2:18 am

That is really the bomb.

Craig.

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: Coding an Update Functionality for an LC App ?

Post by ghettocottage » Sat Jan 20, 2018 2:58 am

Here is the thread where I learned about it a couple of years ago:
http://forums.livecode.com/viewtopic.ph ... 80#p155580

@FourthWorld goes into some more details on ways to secure it. I have used this method on a database project I was working on. Worked across all Desktops (mac, windows and linux) without any issues.

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Coding an Update Functionality for an LC App ?

Post by teriibi » Sat Jan 20, 2018 3:09 am

hmm...okay...so its mostly useable on larger screens...like desktop ones.
I mean : it wont resize out of the box to smartphones or tablets ? :oops:

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: Coding an Update Functionality for an LC App ?

Post by ghettocottage » Sat Jan 20, 2018 3:25 am

hmm...okay...so its mostly useable on larger screens...like desktop ones.
I mean : it wont resize out of the box to smartphones or tablets ?
why not? It will do whatever you have set the stack to do.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Coding an Update Functionality for an LC App ?

Post by jmburnod » Sat Jan 20, 2018 9:30 am

Hi,
you can update the stack on your server whenever you want. Whenever anyone opens that launcher, it will open your most recent version of your stack
As far i know that is not possible for iOS app. Apple doesn't allow import code and consider stacks as code
Best regards
Jean-Marc
https://alternatic.ch

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Coding an Update Functionality for an LC App ?

Post by teriibi » Sat Jan 20, 2018 10:54 pm

@Cottage,
- Launcher App was built
- basic Sqlitex.livecode uploaded
...testing the window launcher.exe ....Stack opens....but nothing more happens :shock:
Whats to modify in this script ? :?
(I added the "Select all" line .. as I saw this in a previous topic)
Image
Attachments
not launching.png

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Coding an Update Functionality for an LC App ?

Post by Klaus » Sat Jan 20, 2018 10:57 pm

Replace
-> Select all
with
-> on openstack
8)
Dont close the launcher stack for testing and try again.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Coding an Update Functionality for an LC App ?

Post by Klaus » Sat Jan 20, 2018 10:59 pm

Ah, error checking!
Add this after the go url... line:
...
if the result <> EMPTY then
answer the result
end if
...
May give a hint, if the download fails for whatever reason.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”