Hi,
with this little snippet I make my first steps in this new world:
var beacons = require('com.liferay.beacons'); beacons.setAutoRange(true); beacons.startMonitoringForRegion({ identifier : 'Region by UUID and major and minor', uuid : '11111111-2222-3333-4444-555555555555', major : 0, minor : 0 }); beacons.addEventListener("enteredRegion", function(e) { console.log("identifer: " + e.identifier); console.log("uuid: " + e.uuid); console.log("major: " + e.major); });After start comes this ugly red lines on console:
[ERROR] : LiferayBeaconsModule: (KrollRuntimeThread) [0,228] Cannot start monitoring region {minor=0, identifier=Region by UUID and major and minor, major=0, uuid=11111111-2222-3333-4444-555555555555} [ERROR] : LiferayBeaconsModule: android.os.RemoteException: The IBeaconManager is not bound to the service. Call iBeaconManager.bind(IBeaconConsumer consumer) and wait for a callback to onIBeaconServiceConnect() [The full error log.
In my tiapp.xml are this lines:
<android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest package="de.appwerft.ibeacontest"> <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19"/> <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <service android:enabled="true" android:exported="true" android:isolatedProcess="false" android:label="iBeacon" android:name="com.radiusnetworks.ibeacon.service.IBeaconService"> </service> <service android:enabled="true" android:name="com.radiusnetworks.ibeacon.IBeaconIntentProcessor"> <meta-data android:name="background" android:value="true" /> <intent-filter android:priority="1" > <action android:name="de.appwerft.ibeacontest.DID_RANGING"/> <action android:name="de.appwerft.ibeacontest.DID_MONITORING"/> </intent-filter> </service> </manifest> </android>Any ideas?