datalogic / xamarin-samples

Sample apps that use the Datalogic Xamarin SDK
6 stars 10 forks source link

Device.Input.AdvancedKeyboard #9

Closed Metalit0101 closed 3 years ago

Metalit0101 commented 4 years ago

Hi!

I have a skorpio x4. I using lastest version of xamarin SDK (1.22.*). I would to bind keyevent of phisical keypad on android, but with this class:

Com.Datalogic.Device.Input.KeyboardManager keyboardManager = new Com.Datalogic.Device.Input.KeyboardManager();
AdvancedKeyboard advancedKeyboard = keyboardManager.AdvancedKeyboard; //when i try get, i get error
advancedKeyboard.AddActionEventListener(this);

At the second line I have this error:

Unhandled Exception:

Java.Lang.NoSuchMethodError: no method with name='getAdvancedKeyboard' signature='()Lcom/datalogic/device/input/AdvancedKeyboard;' in class Lcom/datalogic/device/input/KeyboardManager;

Where am I wrong? You have a sample app to bind the keys?

Thanks, Marco Pedrazzi

codybrookshear commented 3 years ago

Hi Marco,

First, my apologies for taking so long to get back to you. I think the problem is that your device doesn't have a Datalogic SDK version 22 or greater built-in. The most recent firmware (2.07.03) has version 1.21. The AdvancedKeyboard class was added in SDK version 22. Since you have the 1.22 version of the Xamarin SDK, the API appears to be available, but in reality, that SDK version is not resident on the device. And unfortunately, we don't have a Keyboard sample app at the moment.

This process needs improvement to be certain, but for now, this is the process you can go through to these steps:

  1. Find out what version of the SDK is present in your device's firmware in the Release Notes. In this case, it's version 1.21, as reported in section 8.
  2. Find the matching API in the Xamarin Documentation, and click the "Android Documentation" link at the top if the page.
  3. That takes you to the Android SDK Documentation. You can see that on that page, the AdvancedKeyboard was "Added in revision 22".