Xamarin support

General information about Neurotechnology and its software

Xamarin support

Postby EvgeniyK » Jul 14, 2017 10:15

HI. I have found this answer http://www.neurotechnology.com/neurotec-forum/viewtopic.php?f=3&t=3275&p=97668&hilit=xamarin#p97783 from late 2014 about Xamarin support for your SDK. Is situation changed for now days? Can I use some C# SDK libraries in Xamarin project for creating multiplatform (Android, iOS, Windows Phone) application with Face Extracting and Liveness detection?
EvgeniyK
 
Posts: 3
Joined: Jul 14, 2017 09:43

Re: Xamarin support

Postby vaidasz » Jul 17, 2017 06:42

EvgeniyK wrote:HI. I have found this answer http://www.neurotechnology.com/neurotec-forum/viewtopic.php?f=3&t=3275&p=97668&hilit=xamarin#p97783 from late 2014 about Xamarin support for your SDK. Is situation changed for now days? Can I use some C# SDK libraries in Xamarin project for creating multiplatform (Android, iOS, Windows Phone) application with Face Extracting and Liveness detection?


Hello EvgeniyK,

Xamarin is not supported yet.
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 635
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

Re: Xamarin support

Postby ArtificialInsights » Feb 01, 2018 19:56

Any idea if Xamarin will be supported? Or if we can use the C# or Android Libraries to build an app?

I am not sure if the answer above, a very Generic answer, means that sure, it can be used, we just don't support it, or no, it will not work at all.

Reason being, it would be nice to build an Android App in Visual Studio using C# rather than in Android Studio using Java.

Any help would be welcomed.
ArtificialInsights
 
Posts: 4
Joined: May 19, 2017 00:38

Re: Xamarin support

Postby MartynasV » Feb 02, 2018 11:41

ArtificialInsights wrote:Any idea if Xamarin will be supported? Or if we can use the C# or Android Libraries to build an app?

I am not sure if the answer above, a very Generic answer, means that sure, it can be used, we just don't support it, or no, it will not work at all.

Reason being, it would be nice to build an Android App in Visual Studio using C# rather than in Android Studio using Java.

Any help would be welcomed.

Hello ArtificialInsights,

Officially Xamarin is not supported by our SDK and we have no plans to support it. Further more we haven't tested or know who tried Xamarin with our SDK, so I can't tell you if it would work.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 515
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Xamarin support

Postby zerokewl88 » Aug 28, 2019 08:26

I'm currently working on a project that will incorporate Xamarin with the Android FaceExtractor / FaceMatcher libraries.

I wanted to know since i found this thread, and as it indicates that there is no planned action towards implementing Xamarin support - has this changed since the last few years this thread was created ?

Thank you.
zerokewl88
 
Posts: 18
Joined: Feb 14, 2019 01:26

Re: Xamarin support

Postby MartynasV » Aug 29, 2019 09:53

zerokewl88 wrote:I'm currently working on a project that will incorporate Xamarin with the Android FaceExtractor / FaceMatcher libraries.

I wanted to know since i found this thread, and as it indicates that there is no planned action towards implementing Xamarin support - has this changed since the last few years this thread was created ?

Thank you.

Hello zerokewl88,

No, our plans towards Xamarin didn't change, but as Microsoft are pulling their all .NET frameworks together it should work as we provide .NET Standard libraries(2.0 version) with our SDK.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 515
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Xamarin support

Postby zerokewl88 » Sep 02, 2019 02:44

Hi, and thank you for your response.

So far so good, migrating and porting a Binding Library across seems to be working.

I am stuck though on getting the Activation / LIcense server recognized.

I have tried using a JNI Direct method, and also using the Binding Library classes, but the returned results are always false for Obtaining Components.

I have installed the Multi Modal sample, and then activated and received a Obtain License success message. Sometimes though there is a AppComp warning message.

When the license server has obtained it's components, im assuming the server is running in the background, and so i prepare and load the apk with the Xamarin Project - it loads, all works fine, but it can never obtain components correctly.

I have a few questions regarding this..

1. Is loading this multimodal sample, required to get a license server going in the background ? We would eventually need to have this embedded into the application or use a different licensing scheme.
2. After loading the multimodal sample, is it truly just working in the back ground, and should the Xamarin APK, be able to communicate and Obtain Components ?

I've tried obtaining like this, and always returning a False response, even in Trial, and also in using actual Licenses we have.
I am testing this on a real device and not an emulator.

Code: Select all
foreach (string component in Components.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
                {
                    var jValues = new JValue[3];
                    jValues[0] = new JValue(JNIEnv.NewString("/local"));
                    jValues[1] = new JValue(5000);
                    jValues[2] = new JValue(JNIEnv.NewString(component));
                   
                    try
                    {
                        var result = JNIEnv.CallStaticBooleanMethod(jclassNLicense, jmethodobtainComponents, jValues);
                       
                    }
                    catch (Java.IO.IOException e)
                    {
                       
                    }

                    //if (!NLicense.ObtainComponents("/local", 5000, component))
                    //{
                    //    //Helpers.OutputToLog("Error Obtaining License Components Failed: " + component);
                    //    //obtainComponentsSuccess = false;
                    //}
                    //else
                    //{
                    //    //Helpers.OutputToLog("Obtaining License Components Success: " + component);
                    //};
                }
zerokewl88
 
Posts: 18
Joined: Feb 14, 2019 01:26

Re: Xamarin support

Postby MartynasV » Sep 02, 2019 11:22

zerokewl88 wrote:Hi, and thank you for your response.

So far so good, migrating and porting a Binding Library across seems to be working.

I am stuck though on getting the Activation / LIcense server recognized.

I have tried using a JNI Direct method, and also using the Binding Library classes, but the returned results are always false for Obtaining Components.

I have installed the Multi Modal sample, and then activated and received a Obtain License success message. Sometimes though there is a AppComp warning message.

When the license server has obtained it's components, im assuming the server is running in the background, and so i prepare and load the apk with the Xamarin Project - it loads, all works fine, but it can never obtain components correctly.

I have a few questions regarding this..

1. Is loading this multimodal sample, required to get a license server going in the background ? We would eventually need to have this embedded into the application or use a different licensing scheme.
2. After loading the multimodal sample, is it truly just working in the back ground, and should the Xamarin APK, be able to communicate and Obtain Components ?

I've tried obtaining like this, and always returning a False response, even in Trial, and also in using actual Licenses we have.
I am testing this on a real device and not an emulator.

Code: Select all
foreach (string component in Components.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
                {
                    var jValues = new JValue[3];
                    jValues[0] = new JValue(JNIEnv.NewString("/local"));
                    jValues[1] = new JValue(5000);
                    jValues[2] = new JValue(JNIEnv.NewString(component));
                   
                    try
                    {
                        var result = JNIEnv.CallStaticBooleanMethod(jclassNLicense, jmethodobtainComponents, jValues);
                       
                    }
                    catch (Java.IO.IOException e)
                    {
                       
                    }

                    //if (!NLicense.ObtainComponents("/local", 5000, component))
                    //{
                    //    //Helpers.OutputToLog("Error Obtaining License Components Failed: " + component);
                    //    //obtainComponentsSuccess = false;
                    //}
                    //else
                    //{
                    //    //Helpers.OutputToLog("Obtaining License Components Success: " + component);
                    //};
                }

Hello,

In order to use our SDK on Android, you have to set context e.g. NCore.setContext(context), as it is done in our Android samples/tutorials. Unfortunately, this method exists only in Android API, so you will have to wrap it, in order to set context from C#.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 515
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania


Return to Public

Who is online

Users browsing this forum: No registered users and 3 guests