Question

We are in the process of deciding whether our port of a legacy Compact Framework/Windows CE app (potentially cross-platform, thus using Xamarin in Visual Studio) should be done first for Android or Windows Phone 8 (iOS is on the "back burner").

I imagine the port of the existing (C#) code would be easier if we targeted WP8 (as opposed to Android), nevertheless welcome rebuttals/refutations. Am I right?

Even better would be some sample code of how such manipulation (sending PCL* from the PCL**) is accomplished. Does anybody have any they'd like to share (has anybody done this yet)?

If it is relevant, the device we would probably be writing to is a Zebra QL220, and we would be sending a barcode and related info.

* Printer Control Language
** Portable Class Library
Was it helpful?

Solution

Android Bluetooth socket with Xamarin exposes System.IO.Stream for both input and output. As long as you target the stream with the communication protocol you should be able to swap out Android BT socket with a virtual serial port on a computer or any other option that also provides a Stream to write to and read from. You could abstract it even further but I feel Stream is probably the most convenient target.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top