What's the suggested migration path from LinkOS_Xamarin_SDK?

// Expert user has replied.
J Jonathon Minard 1 month 2 weeks ago
92 3 0

We used the LinkOS_Xamarin_SDK NuGet package in our Xamarin.Android and Xamarin.iOS apps to communicate with Zebra printers.  We're now migrating our apps to .NET 8.  It appears that LinkOS_Xamarin_SDK package isn't available to .NET 8.  Zebra.Printer.SDK looks to be the replacement, but its API appears to be vastly different.  Is there a more direct upgrade path, such as new bindings for the Java and Objective C libraries?

Please Register or Login to post a reply

3 Replies

S Steven Si

The Zebra.Printer.SDK NuGet package has moved away from Xamarin to supporting .NET MAUI 8 with the latest release of v3.0.3271. The API themselves have not changed from the previous versions of v2.14.1869 and v2.15.2634, which supported Xamarin. The changes made in v3.0.3271 are mainly underneath the supporting dependences by shifting from .NET Framework 4.7 to .NET MAUI 8. Due to shifting in the dependencies, migrating a Xamarin project to .NET MAUI is not a simple or easy process, because the Xamarin form based implementation and code structure need to be removed or replaced. 

J Jonathon Minard

Thanks.  I get that the Zebra.Printer.SDK NuGet package itself likely hasn't changed much.  My point is that we were using LinkOS_Xamarin_SDK version 1.2.0 instead of Zebra.Printer.SDK.  Was there ever any guide for migrating from LinkOS_Xamarin_SDK to Zebra.Printer.SDK?  For example, this is a valid line when using the Android version of LinkOS_Xamarin_SDK but would be very different when using Zebra.Printer.SDK:

IZebraPrinterConnection connection = new BluetoothPrinterConnection(macAddress);

J Jonathon Minard

After doing some looking around with DotPeek, I eventually found that the changes weren't as drastic as I was thinking on the Android side at least:

  • IZebraPrinterConnection --> Connection
  • BluetoothPrinterConnection --> BluetoothConnection
  • BluetoothPrinterConnection.IsConnected --> BluetoothConnection.Connected
  • IZebraPrinter --> ZebraPrinter
  • IZebraPrinter having properties for FileUtil/etc. --> ZebraPrinter implements those directly

iOS is more problematic since LinkOS_Xamarin_SDK relied more heavily on iOS-specific classes.  Most notably GraphicsUtil.StoreImage used to have an overload which accepts a CGImage, whereas it's looking like I'll need to fetch a Stream now from somewhere.


Can’t find what you’re looking for?