I can successfully download an apk file from a server to my device, using an example provided by Erel(HttpUtils2 version 2.00).
Then the following sub,
But what I need to do is install the file, now I think the file downloads to the File.DirInternalCache.
How could i install the file? Do i need to use 'intent'? My goal is to open up my project then I have a button which a user can click to install the latest version of the software.
If any more info is needed please ask, I thankyou for taking the time to read this post and appreciate any help.
Thanks,
Tom
B4X:
job1.Initialize("Job1", Me)
job1.Download("http://xxxxxxxxxxx/downloads/audit_test.zip")
Then the following sub,
B4X:
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1"
ToastMessageShow("Download Complete", True)
End Select
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
But what I need to do is install the file, now I think the file downloads to the File.DirInternalCache.
B4X:
Sub Service_Create
TempFolder = File.DirInternalCache
'TempFolder = File.DirRootExternal
hc.Initialize("hc")
TaskIdToJob.Initialize
End Sub
How could i install the file? Do i need to use 'intent'? My goal is to open up my project then I have a button which a user can click to install the latest version of the software.
If any more info is needed please ask, I thankyou for taking the time to read this post and appreciate any help.
Thanks,
Tom