Android implementation of Kontakt SDK



I am developing a plugin for the Kontakt IO SDK (Beacons)
The iOS part is done but I have issues with the Android part…

I got this error when I want to create the BeaconListener :

Uncaught (in promise): Error: Cannot convert JavaScript object with id 516837868 at index 0

const KontaktSDK =;
const ProximityManager =;
const ScanPeriod =;
const ScanMode =;
const SimpleIBeaconListener =;

constructor() {
	this.proximityManager = new ProximityManager(;

public startListening() {
    this.proximityManager.setIBeaconListener(new SimpleIBeaconListener({
        onIBeaconsUpdated: function(beacons, region) {
            console.log('BEACONS', beacons);

SDK used :

Someone can help me ? Thanks


Hey Juneli,

It doesn’t become clear what class you are extending, nor what the typescript constructor belongs to.

The first thing that comes to my mind when I see that error is that you are extending a native Android class in TypeScript, naturally a typescript constructor will return a reference to the JavaScript object, and not to that of the underlying extended native object. The solution is simple, append the following at the end of your constructor:

return global.__native(this);

Please provide a complete code sample if what I wrote above doesn’t work for you.

Good luck!


Hi Pete,

I was just trying to implement a Java Interface but it was a Class…