Creating a common Application to run on Zebra and Non-Zebra devices using Xamarin

Hi Team,

I have seen this blog "Creating a common Application to run on Zebra and Non-Zebra devices"  EMDK for Android Programming Practices - Zebra Technologies Techdocs.

Could you please share the Xamarin version of the same documentation / sample ?

Thanks,

Rakesh

Anonymous (not verified)
Hi,No sample exists but the

Hi,

No sample exists but the same steps will work as have been detailed for Java, i.e

  1. Specify android:required="false" for the uses-library tag
  2. Create an EMDK wrapper object to wrap the functionality of the EMDK and implement the EMDK interface.  Do NOT implement EMDK in your MainActivity
  3. Test to see if you are running on a Zebra device or not and if you are, create an EMDKWrapper instance.
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Rakesh R Nair
I try to port the below code

I try to port the below code to C#

But it seems EMDKListener is not available with the SDK.

public class EMDKWrapper implements EMDKListener {   EMDKManager emdkManager = null;   @Override   void getEMDKManager(Bundle savedInstanceState) {    EMDKResults results = EMDKManager.getEMDKManager(getApplicationContext(), this);   if (results.statusCode != EMDKResults.STATUS_CODE.SUCCESS) {   //Failed to request the EMDKManager   }   }}

I did find one interface IEMDKListener

public class EMDKWrapper : IEMDKListener     {         public IntPtr Handle => throw new NotImplementedException();         public void Dispose()         {             throw new NotImplementedException();         }         public void OnClosed()         {             throw new NotImplementedException();         }         public void OnOpened(EMDKManager p0)         {             throw new NotImplementedException();         }     }

But most of the overriden methods are different. Could you please help?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi, there is a sample app at

Hi, there is a sample app at samples-emdkforxamarin-3_0/BarcodeSample1 at master · Zebra/samples-emdkforxamarin-3_0 · GitHub , hopefully that should show how to use the SDK with Xamarin (it should be fairly similar to Android, looks like IEMDKManager is here: EMDKManager.IEMDKListener - Zebra Technologies Techdocs )

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Log in to post comments