Closed gnustory closed 9 years ago
Those action names are just unique strings used to specify actions for the library uniquely, they don't represent anything other than just a string. The manifest details were just copied from sample usage of the (now deleted) Radius iBeacon library. I think it might be a legacy that was never tidied up as I can't see those actions are used at all, but the library definitely should work in background as it actively checks if it's running in background and slows down the scan rate if so. The default background scan rate is every 5 minutes, so you might not be waiting long enough?
At some point our plugin will get a proper upgrade to the AltBeacon library (which is what Radius now support), but until then, the underlying library will remain as is.
Thank you for your reply
I am very happy to hear that beacon plugin works in android background service.
I want to set background scan rate. How could i set background scan rate?
We need to set a short time in background scan rate.
Thanks a lot.
I've not tried it, and it's not exposed in the plugin but if you need to set the backround scan rate you could edit the initLocationManager method in LocationManager.java file, and add this line to the end of that function:
iBeaconManager.setBackgroundBetweenScanPeriod(scanInMilliseconds);
where scanInMilliseconds is your gap between scans.
Hi there. I test this plugin on android background. It could't work.
As i think. There is no "com.unarin.cordova.beacon.IBeaconPlugin.DID_MONITORING" and "com.unarin.cordova.beacon.IBeaconPlugin.DID_RANGING" to work on android background.
"com.unarin.cordova.beacon.IBeaconPlugin.DID_MONITORING" is mentioned at the androidManifext.xml. (about 13 ~ 19 line in the IBeaconIntentProcessor tag)
Do you have any idea to solve it?
I want to run beacon plugin on android background service.
Thanks a lot.