Android Tutorial .Net FileTransfer - Implement AsyncStreams Prefix mode

The attached C# project, implements the new stream protocol of AsyncStreams.
Relevant tutorials:
AsyncStreams Tutorial
FileTransfer - Send and receive files with AsyncStreams

This project allows you to connect the desktop to the FileTransfer app:

SS-2013-07-04_10.34.17.png


SS-2013-06-24_13.24.55.png


Note that the desktop doesn't open a server. So it can only connect to the device.

The SharpZipLib library, which is included in the zip file, is required for the checksum calculation.

There is a single change that needs to be done in device FileTransfer app:
AsyncStreams should use little endian instead of big endian. This is done by setting the second parameter of astream.InitializePrefix to False (Sub StartAStream).

The C# source code and executable are attached.
 

Attachments

  • FileTransfer-Desktop.zip
    81.2 KB · Views: 4,212

code4fun

Member
Licensed User
Longtime User
Thnx for your answer, really helpful stuff. Just for the sake of it, i was able to to run the C# desktop server without problem using mono on a Linux machine (without B4J). Having said that, B4J is the way to go from now onwards. Again, if someone has transfered the server code to python and would like to share it, i'd be grateful.
 
Top