Page 1 of 1

Android update system

Posted: Wed Nov 29, 2017 8:12 pm
by Zood
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!

Re: Android update system

Posted: Wed Nov 29, 2017 9:40 pm
by FourthWorld
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

Re: Android update system

Posted: Thu Nov 30, 2017 8:14 pm
by jacque
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.