Page 1 of 1

Auto-Update

Posted: Fri Jul 18, 2014 4:15 pm
by viro
Hi there,
trying to auto update my lc app...
made a test stack.
Problem: when launching downloaded apk it tries to open with zip-app (eg. ed file explorer, flashify, etc)

can this behaviour be changed?

Re: Auto-Update

Posted: Fri Jul 18, 2014 6:33 pm
by Simon
HI viro,
Have you tried just renaming the extension?

Code: Select all

 libUrlDownloadToFile "https://dl.dropbox.com/s/oyinmwd8zpdcqip/Update.viro",\
   specialfolderpath ("documents") & "/Update.viro", "unZip"
liveCode doesn't mind what the name is.

Simon

Re: Auto-Update

Posted: Fri Jul 18, 2014 6:51 pm
by viro
Hey Simon, i think you misunderstood me.
My problem is not unzipping the update package - no matter the extenion ,it works.
It's about initiating the Installation of the apk in Android.
Any hints in that?

Re: Auto-Update

Posted: Fri Jul 18, 2014 6:58 pm
by Simon
Ahh sorry, I did misunderstand.
.apk is an archive (zip) package.
Pretty sure it has to be installed not just opened.

Simon

Re: Auto-Update

Posted: Fri Jul 18, 2014 7:03 pm
by Simon
Take a look at this:
http://lessons.runrev.com/m/4071/l/1737 ... pplication
it's how we(?) update apps.
From that lesson your app is really "main.rev (.livecode) and it's the one you download.

But the Play store has updates that notify the user.

Simon

Re: Auto-Update

Posted: Fri Jul 18, 2014 7:04 pm
by viro
But How to install? :D
So there is no other way but to use a launcher ?

Re: Auto-Update

Posted: Fri Jul 18, 2014 7:05 pm
by Simon
cross post see above.

Re: Auto-Update

Posted: Sat Jul 19, 2014 1:05 pm
by viro
Push...
Is there definitly no way to initiate apk Installation through apps built with LiveCode?

Re: Auto-Update

Posted: Sat Jul 19, 2014 3:02 pm
by FourthWorld
viro wrote:Push...
Is there definitly no way to initiate apk Installation through apps built with LiveCode?
There may be, but for the benefit of the user I wouldn't advise it, encouraging them to go through Google Play instead. Side-loading is where malware happens, so we don't want to get users into the habit of bypassing Android's build-in security mechanisms like the side-loading lock.

Re: Auto-Update

Posted: Wed Jul 23, 2014 10:23 am
by viro
UpdateAndroid.zip
Updater
(2.65 KiB) Downloaded 353 times
Here's what i use now to keep my apps updated
Feel free to share improvements!

regards viro