I have this segment, to make a backup into SD card.
It works fine, but after select the SD, while performing the backup, a blank screen remain visible.
I solved it inserting a DoEvents into the copy procedure. The device returns to the previous screen while performing the backup.
It is warned that doevents should not be used. But Sleep(0) doesn't do the job. Any alternative?
It works fine, but after select the SD, while performing the backup, a blank screen remain visible.
I solved it inserting a DoEvents into the copy procedure. The device returns to the previous screen while performing the backup.
It is warned that doevents should not be used. But Sleep(0) doesn't do the job. Any alternative?
B4X:
Sub BtnBackupSD_Click
Msgbox2Async("A Backup will be made into the device selected","Yes","Cancel","No", Null,False)
Wait For Msgbox_Result (Result As Int)
If Result <> DialogResponse.POSITIVE Then
Return
End If
Storage.SelectDir(False)
Wait For Storage_ExternalFolderAvailable
Awake.KeepAlive(True)
ProgressDialogShow2("Performing Backup",False)
[B]PerformBackupSD [/B]' this is the procedure that copy the files, there I inserted a Doevents , Sleep(0) doesn't do the job[B][/B]
MsgboxAsync (f.getlg("End Backup"),"Backup")
Wait For msgbox_result
Awake.ReleaseKeepAlive
End Sub