Android Question AsyncStreams_NewStream event

MartinR

Member
Licensed User
I'm trying to transfer files from a PC to an Android device. I have managed to do this using VB6 code on the PC, Bluetooth dongle, virtual COM port, B4A serial library, prefix-mode asyncstreams_newdata event.

The FileTransfer example on this forum uses both asynchstreams_newdata and asynchstreams_newstream events, but I cannot get the code to work (cannot get device to connect to PC) so cannot follow exactly what the _newstream event does, when it triggers.

I cannot find any documentation for the _newstream event: it is not mentioned in the B4A book, and I can't I find it covered anywhere else.

I would like to know what it does, how to use it, whether it is easier/better to use than the _newdata event.

Many thanks,

Martin
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

MartinR

Member
Licensed User
Am I correct to understand that the NewStream event will only be triggered when it receives a stream generated by Astream.WriteStream? If so, I need to know the details of what a stream generated by WriteStream looks like so that I can send the data from the PC in compliance with that protocol, using VB6 code.

I will stick with the NewData event for now, I think, since the prefix-mode protocol is quite easy to understand/implement.

Many thanks.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…