Search code examples
javaandroidibeaconibeacon-android

Problems with Kontakt.io Beacon example


I have recently acquired a beacon from Kontakt.io

I followed the "Monitoring code example" from here: http://docs.kontakt.io/android-sdk/quickstart/#monitoring-code-sample

The Kontakt library is included (since other methods from the library is working), but the following line is giving me an error:

beaconManager.startMonitoring(Region.EVERYWHERE);

Error:

startMonitoring (java.util.Set<com.kontakt.sdk.android.device.Region>) in BeaconManager
cannot be applied to (com.kontakt.sdk.android.device.Region)

I have also tried creating a new region with the proximity uuid from the beacon:

static UUID uid = UUID.fromString("1DEFF9522D014664BB6088F065302B83");
private static final Region beacon = new Region(uid, 49668, 35726, null);

but this throws the same error.

I'm quite new to java and this might be a fairly simple question, but how do i resolve this?


Solution

  • If you check the changelog on their website you will see that there is new version of API. Clearly example is not updated. If you want to monitor Region.EVERYWHERE you can simply call beaconManager.startMonitoring() according to docs it should work.