To write some data to a target device (in case a printer).
Ho to be sure that the target device has got the data that I sent and processed it successfully ?
If AsyncStreams_Error and terminated events were not raised then the data was supposedly sent successfully.
How is the printer connected to the Android device? Bluetooth?
If it is Bluetooth or TCP (Socket) then you can assume that the data arrived successfully.
If AsyncStreams_Error and terminated events were not raised then the data was supposedly sent successfully.
How is the printer connected to the Android device? Bluetooth?
If it is Bluetooth or TCP (Socket) then you can assume that the data arrived successfully.
Sub AStreams_Error
Log ("AStream error..." & LastException.Message)
End Sub
Sub AStreams_Terminated
Log ("AStreams Terminated..." & LastException.Message)
End Sub
I see that the AStreams_Error is raised when a .Connect() fails.
I don't understand when AStreams_Terminated is raised ?
AStreams_Error cannot be raised when you call connect as AStreams is only initialized after the connection has been established.
Generally speaking you should treat the Error and Terminated events in the same way. You can call AStreams_Terminated from AStreams_Error.
If the other side gracefully closed the connection then the Terminated event will be raised.
AStreams_Error cannot be raised when you call connect as AStreams is only initialized after the connection has been established.
Generally speaking you should treat the Error and Terminated events in the same way. You can call AStreams_Terminated from AStreams_Error.
If the other side gracefully closed the connection then the Terminated event will be raised.