B4J Question How to use progress bar with asyncstreamObject

Reminisce

Active Member
Button senndfile code:
Sub btnsendfile_click

    Try
        'If connectionstatus = False Then

        '    toast.Show("Your devices are not connected.")

        'Else

    Dim fc As FileChooser

    fc.Initialize

    fc.InitialDirectory = File.DirApp

    fc.Title = "Choose file to send"

    frmconnect.AlwaysOnTop = False

    Dim name As String = fc.ShowOpen(MainForm)

    Dim filename As String =  name.SubString(name.LastIndexOf("\")+1)

    Log(filename)

    If name <> "" Then

        Dim strfilename As String = "file"&filename

        

        

        astreamsobj.WriteFile(strfilename,"", name)

        ShowNotification("Sending"&" "&filename,False)

        Else

            toast.Show("File sending cancelled.")

    End If

    'End If

    Catch

        Log(LastException)

    End Try

    

End Sub
I want to be able to show the progress of the file being sent.

How do I achieve this?
 
Top