I have code in C# core to provision, register IoT devices to IoT hub Azure using Azure C# sdk
I would like to use that to work in Android Device.
Is there any way I can build executable and libraries compatible to Android using Xamarin
Try to incorporate Java libraries into your Xamarin.Android application by creating a Bindings Library.
Xamarin.Android offers two ways to use these third-party libraries:
Create a Bindings Library that automatically wraps the library with C# wrappers so you can invoke Java code via C# calls.
Use the Java Native Interface (JNI) to invoke calls in Java library code directly. JNI is a programming framework that enables Java code to call and be called by native applications or libraries.
Check the tutorial:
I am not clear with the explanation.
My requirement is I have C# core code to provision, register IoT devices to IoT hub Azure using Azure C# sdk.
I want to use the same library in Android to build an executable (not app) to perform these operations.
I am interested to know If there is a way to do this.
I am not clear why should I plugin java libraries, Could you please explain me in detail if possible?
If you have code written in Java or an SDK that you need to access from Xamarin. You can create a binding project to access the file to reference a Jar or Aar file in your Xamarin project.
I have code in C# (dotnet core and dotnet Standard)
And I would like to use that to build an executable(not app), which need to run on Android.
Any clue How can we do this?
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies