Cannot convert Javascript Object



I’m trying to integrate a third party finger print scanner (IB Scan) for Android with my NativeScript app.

I’m getting an error Cannot convert object to com.integratedbiometrics.ibscanultimate.IBScanListener at this line -

I have also uploaded the working sample of native android project here -

Does anyone has clue how to fix this?


why not use

It supports both Android and iOS.


@multishiv19 Thanks for the suggestion, but as I already mentioned I’m trying to integrate a third party scanner, not for the purpose of authentication but for recording user’s fingerprints.


In your code, the IbScan class extends from Common class, which extends from Observable.
That’s why it cannot be converted to type com.integratedbiometrics.ibscanultimate.IBScanListener.

To implement listeners you can do something like this

As in, create a new Listener of type com.integratedbiometrics.ibscanultimate.IBScanListener and write the methods that are a part of it, inside it. (similar to the way I’m writing onDateSet, in my code)


@multishiv19 Thanks, You were right. Now I’m extending from java.lang.Object and additionally I had to use globals.__native(this) as mention here.


@manojdcoder Awesome! Happy that it worked for you :slight_smile: