I am trying to use the ICradleInsertionListener interface in a Xamarin Forms app but I am getting a very strange error when creating an instance of JoyaCradleListener. The SDK version is 1.2.15.
The error I am getting is this:
Didn’t find class “crc64fb405d81468ba821.JoyaCradleListener” on path: DexPathList[[zip file “/system/framework/com.datalogic.extension.selfshopping.jar”, zip file “/system/framework/com.datalogic.device.jar”, zip file “/data/app/com.extendaretail.shopndrop-1/base.apk”],nativeLibraryDirectories=[/data/app/com.extendaretail.shopndrop-1/lib/arm, /data/app/com.extendaretail.shopndrop-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
NOTE: The scanner is not in the cradle when I run the code as I do not have a cradle only the device so that might be the cause but I honestly don’t see how that could cause this strange error.
The class that implements the interface looks like this:
public class JoyaCradleListener : Java.Lang.Object, ICradleInsertionListener
{
private IDevice device;
public JoyaCradleListener()
{
}
public JoyaCradleListener(IDevice dev)
{
device = dev;
}
public void OnDeviceExtracted()
{
// The scanner was lifted out of the cradle...
device.StopFlash();
LogHelper.Log("JoyaCradleListener - device extracted", LogType.INFO);
}
public void OnDeviceInsertedCorrectly()
{
}
public void OnDeviceInsertedWrongly()
{
}
}
/Magnus