Coding an Update Functionality for an LC App ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Coding an Update Functionality for an LC App ?
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)
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)
-
- 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 ?
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
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.
-
- 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 ?
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
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- 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 ?
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.
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
HyperActive Software | http://www.hyperactivesw.com
Re: Coding an Update Functionality for an LC App ?
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 ?
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)
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
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)
-
- Livecode Opensource Backer
- Posts: 366
- Joined: Tue Apr 10, 2012 9:18 am
Re: Coding an Update Functionality for an LC App ?
+1 for this method. It is quite possibly even more simple than how it sounds.use a launcher stack that opens the most current version of the actual mainstack
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.
Re: Coding an Update Functionality for an LC App ?
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
-
- 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 ?
That is really the bomb.
Craig.
Craig.
-
- Livecode Opensource Backer
- Posts: 366
- Joined: Tue Apr 10, 2012 9:18 am
Re: Coding an Update Functionality for an LC App ?
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.
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.
Re: Coding an Update Functionality for an LC App ?
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 ?
I mean : it wont resize out of the box to smartphones or tablets ?
-
- Livecode Opensource Backer
- Posts: 366
- Joined: Tue Apr 10, 2012 9:18 am
Re: Coding an Update Functionality for an LC App ?
why not? It will do whatever you have set the stack to do.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 ?
-
- 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 ?
Hi,
Best regards
Jean-Marc
As far i know that is not possible for iOS app. Apple doesn't allow import code and consider stacks as codeyou 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
Best regards
Jean-Marc
https://alternatic.ch
Re: Coding an Update Functionality for an LC App ?
@Cottage,
- Launcher App was built
- basic Sqlitex.livecode uploaded
...testing the window launcher.exe ....Stack opens....but nothing more happens
Whats to modify in this script ?
(I added the "Select all" line .. as I saw this in a previous topic)
- Launcher App was built
- basic Sqlitex.livecode uploaded
...testing the window launcher.exe ....Stack opens....but nothing more happens
Whats to modify in this script ?
(I added the "Select all" line .. as I saw this in a previous topic)
Re: Coding an Update Functionality for an LC App ?
Replace
-> Select all
with
-> on openstack
Dont close the launcher stack for testing and try again.
-> Select all
with
-> on openstack
Dont close the launcher stack for testing and try again.
Re: Coding an Update Functionality for an LC App ?
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.
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.