I am trying to create my first Android app: all it has to do is download a file, rename it if required, extract the contents of the file (there will be one file in the archive):
I try to download https://www.kockarna.si/bp/1.1 (kockarna.si is my personal site)
This is a .zip file. Why 1.1 and not *.zip? Because this file is hosted on the Unix/Linux system and it doesn't matter if I use lowercase 1 or uppercase 1

Then I would like to extract the file that is stored in the .zip file (password is 123).
I am stuck at the download already. Here is the code. I based it on the http.sb example:
Code: Select all
;No debug
CloseDebugOutput()
; download https://www.kockarna.si/bp/1.1
; rename to 1.zip if required
; unzip 1.1 (or 1.zip) to 'downloads'
;
Procedure HttpGetEvent(Success, Result$, UserData)
If Success
Debug Result$
Else
Debug "HTTPRequest(): Error"
EndIf
EndProcedure
Procedure ButtonEvent()
HTTPRequest(#PB_HTTP_Get, "https://www.kockarna.si/bp/1.1", "", @HttpGetEvent())
; 1.1 is .zip file
; password for zip 123
EndProcedure
If OpenWindow(0, 100, 100, 250, 100, "Download 1.1")
ButtonGadget(0, 10, 10, 250, 100, "Download 1.1")
BindGadgetEvent(0, @ButtonEvent())
EndIf
I really have no clue what to do.
And it looks like it opens in full window - I don't want to open in full window. In my settings I have 'fullscreen' unchecked.
Any help would be very useful.
Thanks.
Saso