Android: Why must the context implement IDcsScannerEventsOnReLaunch?

C Christoph Rathkolb 9 months 1 week ago
99 1 0

In the current version of the library (v2.6.19.0), we have following cast:

BluetoothLEManager(Context context) {
this.scannerEventsCallback = (IDcsScannerEventsOnReLaunch)context;

which immediately leads to a crash unless the context implements this interface.

What's the reason for this? Why cannot any class implement this interface and I can specify this as parameter or in an own method?

Previous versions of the library didn't have this restriction!?

Please Register or Login to post a reply

1 Replies

B Brett Changus

I'm seeing a similar problem with Xamarin Wrapper for Scanner SDK (Android & iOS) on Android.

https://developer.zebra.com/content/xamarin-wrapper-scanner-sdk-android-ios-btle-opmode-crashes-android-app

CONTACT
Can’t find what you’re looking for?