|
[WM24] Utilizing Android APK Expansion Files? |
Iniciado por Claire, jul., 15 2019 6:08 PM - Sem resposta |
| |
| | | |
|
| |
Membro registado 48 mensagems |
|
Publicado em julho, 15 2019 - 6:08 PM |
Does anyone have any experience with using APK expansion files?
Right now we are having an issue where upon initialization of our app (first time the app is opened) it downloads images and some information via FTP. For some reason, after it says "downloading photos" the message refreshes and it starts the process of downloading photos again? I am not entirely sure where this problem is occurring and free tech support won't look at my entire app (seeing that I sent them the whole version because I am not sure what bits and pieces are working together at the moment the error occurs.
I was thinking of changing the app to use the APK expansion files process where I can upload a zip file with the APK and access the information that way but there doesn't seem to be any information on what code is needed unless you are using Android Studio.
This is the code, from what I can tell, that is handling the extraction - has any of this language changed between WM 22 and WM 24? I don't receive any error messages at all, just the constant loop around 'downloading photos'
sAPKExtensionFile is string sAPKExtDir is string sImageZip is string nConnection is int
sImageZip = "" sAPKExtDir = SysDirStorageCard() + "/Android/obb/edu.misin.edu/" fDelete(sAPKExtDir + ["/"] + "*.obb") sAPKExtensionFile = sAPKExtDir + "main." + gnAndroidVersion + ".edu.misin.edu.obb" IF NOT fDirectoryExist(sAPKExtDir) THEN fMakeDir(sAPKExtDir) END IF fFileExist(sAPKExtensionFile) THEN fDelete(sAPKExtensionFile) END
WHEN EXCEPTION IN WIN_Extract.STC_Extracting = "Connecting to server..." Multitask(-1) nConnection = FTPConnect(gsFTPServer,gsFTPUser,gsFTPPass,gnFTPPort) IF nConnection <> -1 THEN gbFirstImageZipDownload = True WIN_Extract.STC_Extracting = "Downloading Photos..." Multitask(-1) fCreate(sAPKExtensionFile) IF FTPGet(nConnection, gsFTPDownloadDir + "Resources/Images/Images.zip",sAPKExtensionFile,FTPDownloadImagesProgress) = True THEN sImageZip = sAPKExtensionFile ELSE NextTitle("Alert") Error("Unable to download images from server: " + ErrorInfo(errMessage), "Please try reloading from the Settings page.") END ELSE NextTitle("Alert") Error("Unable to connect to the server: " + ErrorInfo(errMessage), "Images could not be downloaded.","Please try reloading from the Settings page.") END DO NextTitle("Alert") Error("Unable to connect to the server: " + HError(), "Images could not be downloaded.","Please try reloading from the Settings page.") RETURN END IF NOT sImageZip = "" THEN ResOpenArchiveImage = zipOpen("ArchiveImage", sImageZip) IF ResOpenArchiveImage = 0 THEN ResExtractAllImage = zipExtractAll("ArchiveImage",CompleteDir(fCurrentDir() + "/Resources/Images")) END zipClose("ArchiveImage") END
IF fFileExist(sAPKExtensionFile) THEN fDelete(sAPKExtensionFile) END
WIN_Extract.STC_Extracting = "Extracting resources..." WIN_Extract.PROGBAR_Populating..Visible = False Multitask(-1)
|
| |
| |
| | | |
|
| | | | |
| | |
|