7 Replies Latest reply on May 15, 2018 8:08 AM by Robin West

    Xamarin LinkOS .NET Standard Support

    John Ferlazzo



      Is there planned support for .NET Standard for the LinkOS Plugin?



        • Re: Xamarin LinkOS .NET Standard Support
          Matthew Belk

          I have the same question and am not going to be able to use this tool until I can figure it out. I am using netstandard1.4 and I've tried to change the value of the "imports" element in project.json, but no joy. I really don't want to have to write a whole abstraction layer for my Xamarin Forms dll's to hide away the LinkOS object model, but I guess I will if I can't find a way around this.

            • Re: Xamarin LinkOS .NET Standard Support
              John Ferlazzo

              Unfortunately I could never get the "imports" working either. In my case I was just using Xamarin.iOS and Xamarin.Android and didnt need to specifically call LinkOS from shared code. A the moment I have a "utility" class that makes all the calls to the LinkOS methods. It is a shared as a linked class in both iOS and Android projects. In the future I would like to call this from my netstandard project but as you said - will need to create my own abstraction layer.


              Would be nice to get a response on this one or some kind of road map update. The Xamarin plugin has not been updated since mid 2016.

                • Re: Xamarin LinkOS .NET Standard Support
                  Robin West

                  Hi John and Matthew,

                  While we can't speak to roadmap, this is something we recognize as a desire from the developer community, especially with our .NET standard release last year.  It was not attached to the Xamarin SDK.  We have a few questions around your needs so we can best determine next steps.  What specific OS's do you need it to run on?  Are the Xamarin portable methods in our SDK sufficient for your needs? Do you have any other feedback for the team?

                  Thanks, Robin

                    • Re: Xamarin LinkOS .NET Standard Support
                      John Ferlazzo

                      Hi Robin,


                      Thank you for the response. The OS's would be iOS and Android for myself, this would be an example of my project structure (using classic Xamarin).


                      - Sample.Common (.Net Standard 2.0 Portable Library)

                      - Sample.Droid (Xamarin.Android)

                      - Sample.iOS (Xamarin.iOS)


                      What I would like to be able to do is restore the LinkOS nuget into the Sample.Common project as this is where we share as much code as possible. Right now the calls to the LinkOS sdk need to be replicated in both Android and iOS projects. This would be the same case for a Xamarin.Forms project where a custom abstraction layer would need to be created currently.


                      The current methods in your SDK are sufficient for my needs. I suspect porting the PCL to target a .Net Standard version would be fairly simple and straight forward. The .net standard version should be as low as possible to attempt to accommodate as many users as possible. Example, if the LinkOS SDK has a dependency on .net standard 1.1, then anyone that has a project that targets .net standard 1.1 or higher will be able to consume it.




                        • Re: Xamarin LinkOS .NET Standard Support
                          Matthew Belk

                          This is exactly my same scenario. If it doesn't already, the PrintImage would need to accept a System.Drawing.Bitmap object or the byte array representation of such so that the PCL developer wouldn't need to worry about CGImages or Android.Graphics.Bitmap objects. Right now, we're sending our print jobs (basically line print commands) and associated images to platform-specific "Dependency" implementations.


                          Thanks for your responsiveness.



                        • Re: Xamarin LinkOS .NET Standard Support
                          Jay Kappel



                              I work for a large farming corporation, and we use your portable printers exclusively.  We're in the process of re-writing our mobile application on Xamarin Forms with .Net Standard.  We really need a .Net Standard version of LinkOS as well.  My project structure is the same as John mentioned.  Are you all working toward a release that will address this need in the very near future, or should I be seeking some sort of work around?


                          Has anyone figured out how to make this work?  If so, would you be willing to share your solution?


                          Thanks, Jay