In the new class in coresdk fo v1.03, I have a problem which function is for monitoring and which one is for listening so that I can get the example calls completely replaced.
I am using Eclipse. Could you please help shed some lights?
Thanks a lot.
there is no function for listening, you can monitor or range region.
You have to set a listener for when the Bluetooth service notifies you an event.
declare your BeaconManager, BeaconManager manager = new BeaconManager(this);
set a listener and implement the method to handle the answer, manager.setMonitoringListener(new BeaconManager.BeaconMonitoringListener { @Override public void onEnteredRegion(BeaconRegion region, List<Beacon> beacons) { // Handle action here } @Override public void onExitedRegion(BeaconRegion region) { // Handle action here } }
Thanks. My understanding of monitoring is to monitor if the device is within the range of beacon which matches the monitoring criteria, and ranging is to get detailed info of the list of detected beacon.
In the old example, there are three uses of beaconManager of (the sdk class)
beaconManager.setMonitoringListener(new BeaconManager.MonitoringListener() {
beaconManager.startMonitoring(
beaconManager.setRangingListener(new BeaconManager.RangingListener()
But in coresdk, I am not sure how can I replace the calls, so that I can do monitoring / ranging whenever I want.
It works, and I have been overlooking on the new classes.
thanks for reminding me.
However, I go the below even I have added the right permission and i have tried using either clause below but I still got the error. Could you please shed some lights? thanks a lot. (I am using Elipse)
Error
E/EstimoteSDK(15992): SystemRequirementsHelper.hasServiceDeclaration:216 AndroidManifest.xml does not contain BeaconService declaration.
W/EstimoteSDK(15992): BeaconManager.connect:335 Could not bind service: make sure thatcom.estimote.sdk.scanning.BeaconService is declared in AndroidManifest.xml
<!-- Permissions to use Bluetooth --> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
I did not put those declarations, and my app’ is running well (ish ;)).
The error
W/EstimoteSDK(15992): BeaconManager.connect:335 Could not bind service:
make sure thatcom.estimote.sdk.scanning.BeaconService is declared in
AndroidManifest.xml
says that you are still using the estimote.sdk library. Is the old version.
I still get the error, details as follows:
I am using Android 5 runing on non-Android M device.
After tracing, the two errors
W/EstimoteSDK(15992): BeaconManager.connect:335 Could not bind service:
make sure thatcom.estimote.sdk.scanning.BeaconService is declared in
AndroidManifest.xml
throw on this line:
I don’t know what this error is, I personnaly use Android Studio so Gradle does the SDK integration task for me (if I understand well what happens ^^).
I have no need of the following lines: