Android Question Http2tools download a .apk file

Tom1s

Member
Licensed User
Hi

I don't want to put my program to google play just yet.

I have made a update check to program and if update is available it could be downloaded and installed.
Update check works nicely.
File is not big but how to implement it? Download and callsubdelayed to start install?

Link is api end point link so when calling or putting in chrome it would start the download.

like this http://site.net/...DnnApiEndpoint/Api.ashx?method=Application&APIKEY
B4X:
Dim upgrade As HttpJob
    Dim upgradelink As String = "http://site.net/..DnnApiEndpoint/Api.ashx?method=VERSION&apikey=apikey"
    upgrade.Initialize("upgrade",Me)
    upgrade.Download(upgradelink)

Sub JobDone(Job As HttpJob)
If Job.Success = True Then

????
 

udg

Expert
Licensed User
Hi Tom,

maybe my AppUpdating lib's code could be of some help.
I wrote it for your same reason, PlayStore independence, and made it available both in compiled and source-code form.
So, please, feel free to use it as is or to borrow from it any code or inspiration you may deserve.

udg
 
Last edited:

Tom1s

Member
Licensed User
Hi udg,
Your code was very good and educational. I got a lot of ideas,thanks!
One problem. I think my code would work now if the link was direclty to the file,but now i call the api and then it sends the file. Somehow it is not working..any ideas?
 
Top