Android update system

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Zood
Posts: 37
Joined: Mon Apr 24, 2017 7:17 pm

Android update system

Post by Zood » Wed Nov 29, 2017 8:12 pm

Hello all,

I am trying to build an update system for Android to bypass the Google Store.
Now I have a version-check to see if there is a new version available, uploaded my new version (APK file) to dropbox and everything
For some reason Android wont open my APK-file, while it does open on my Mac (With an error saying it does not know how to open the file, understandable..)
This is my code on Downloading and launching the APK file from dropbox:

Code: Select all

   put "/NewestVersion.apk" into pPath
   put  db2_download (pPath) into url ("file:" & specialfolderpath("documents") & "/NewestVersion.apk" )
   put the result into tResult
   answer tResult
   launch url ("file:" & specialfolderpath("documents") & "/NewestVersion.apk" )
tResult is empty on both Android and MacOS

Thanks in advance!

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

Re: Android update system

Post by FourthWorld » Wed Nov 29, 2017 9:40 pm

Zood wrote:
Wed Nov 29, 2017 8:12 pm
I am trying to build an update system for Android to bypass the Google Store.
This article is not recent and there's a chance the policy has changed (I didn't dig deeper, though I'm sure a few minutes' search would turn up a current answer), but in general both Apple's and Google's app store policies include language to restrict the ability of an app from downloading arbitrary unreviewed code onto the user's device. According to this article, doing so will prompt Google to ban the developer from their store:

https://www.tomsguide.com/us/Google-Pla ... 16988.html
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: 7214
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Android update system

Post by jacque » Thu Nov 30, 2017 8:14 pm

in general both Apple's and Google's app store policies include language to restrict the ability of an app from downloading arbitrary unreviewed code onto the user's device
True, but this applies only to apps already in the app stores, which can't download executable code after acceptance. It sounds like the OP wants to avoid Google's Play Store entirely; is that right Zood? Are you distributing the app from a web site or from the Play Store? If your app is already in the Play Store, it has many more protections for the user and you should use the built-in system for updates.

If you are distributing your app independently, then note that Android OS ships by default with a lock on downloads from anywhere other than the Play Store. This lock must be turned off manually by the user. If they have not done that, your app will not be installed. Even users who understand how to unlock downloads may choose not to because of the threat of malware that takes advantage of a phone with this protection disabled.

Also, Dropbox may not be the best distribution platform. While a download should technically work, there are some restrictions on what can be done from DropBox (HTML was disabled recently) and there is no assurance that other changes won't happen in the future. Distribution from your own web site is preferable, where you have control. Even so, the inability to predict if the user's phone will accept "unknown sources" will still be an issue.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Android Deployment”