Link-OS SDK Hands-on with Xamarin


Audience
Tags

Hi there, I have join the Zebra Dev Con at 3th of November for the Link-OS SDK Hands-on with Xamarin session. After the session i have been told by the presenter to set the value of a method or properties in order to reduce the time needed for connection.close method. I am trying to look for the method or properties that i can use to reduce the time to wait for the connection.close() method. So far i have tried set MaxTimeoutForRead = 1000; but the result is same (takes 5000ms) to close. Is that any other properties i could change?

Submitted by James Kimball on November 03, 2021 Permalink

Hello,

In the documentation you can find all the variables that are settable for the BluetoothConnection class. I've highlighted the object below that you will need to set to get a lower wait time before closing the connection.  You can also find this documentation from downloading the LinkOS SDK off the Zebra website and inside the version of the SDK you are using there will be a documentation folder.  Open that up and click on "index" to open the documentation.

Xamarin BluetoothConnection Class Documentation

Submitted by yangsoon.ee@po… on November 04, 2021 Permalink

From the print-station xamarin sample, i couldn't find the bluetoothconnection class and also the method TimeToWaitBeforeClose after i import the zebra.sdk.comm. The version of the sdk is 2.15.2634, am i missing anything?

Submitted by yangsoon.ee@po… on November 09, 2021 Permalink

I manage to find the method, seems like i need to install zebraprinter.sdk then only can find the method TimeToWaitBeforeClose (). Problem now is when i try to import zebra printer.sdk, i get the nuget error

"Package 'MSBuild.Sdk.Extras 1.6.46' has a package type 'MSBuildSdk' that is not supported by project". I am targeting android 8.1 and my visual studio ide is VS2017 version 15.7

Submitted by SSi1 on November 19, 2021 Permalink

Hi Yang Song,

The correct package is the Zebra.Printer.SDK v2.15.2634 and should be imported via the Manage NuGet Packages to your Xamarin project. The Xamarin project that you want the Zebra.Printer.SDK v2.15.2634 to be imported into should be based on Xamarin.Form. Also, the Zebra.Printer.SDK v2.15.2634 is built for .NET Framework 4.7 or later.