I've been trying to use Kontakt.io's sample Android app(available at this address) to implement a simple app that would connect to a Kontakt beacon and change the details such as major, minor, txPower etc. I'm able to detect the beacons and read the correct details for all the above but I am unable to change them. Looking at the sample app, the steps should be straightforward and this is what I've done
- onBeaconsDiscovered has a list of BeaconDevice objects as a parameter so I choose one of those BeaconDevice objects and store it in variable called
beacon
. - I then say
beacon.setPassword("password".getBytes())
. The actual password used is the password for that specific beacon from the Kontakt.io web panel. BeaconConnection beaconConnection = BeaconConnection.newInstance (MyActivity.this, beacon, connListener);
beaconConnection.connect()
That should be it according to the sample app, but it doesn't seem to actually work. I connect to the beacon(meaning onConnected()
callback is called) but I then get an error saying authentication has failed due to a wrong password.
I've tried this with a couple of different beacons, new from Kontakt, using the password from the web panel and it doesn't work so, while a possibility, I don't think I just have a faulty beacon.
There are some comments in their docs about a master password for these beacons - not sure where to get that or if that is what is required.
I'm slightly suspicious of the fact that Kontakt has this sample app here but they haven't released it on the Google Play store(i.e. does their code actually work?).
Either way, I'd appreciate any thoughts on what I'm missing.
I am trying to use this as part of a large application that would do a bunch of things with the beacons, hence the need to write my own app.
Please note this is specifically regarding Kontakt.io beacons and specifically their Android SDK.