lulibrary / background-beacon-monitoring Goto Github PK
View Code? Open in Web Editor NEWCordova Plugin to allow background monitoring of beacons and sending interactions to Library Journeys server
License: Apache License 2.0
Cordova Plugin to allow background monitoring of beacons and sending interactions to Library Journeys server
License: Apache License 2.0
Currently the altbeacon jar file is not linked when the plugin is installed due to a clash if the cordova-plugin-ibeacon is installed as this also uses the altbeacon library for Android (currently working on fixing this). If this is only being used then uncomment the following line in plugin.xml, fix for this is being worked on.
Does that mean this plugin will not work with cordova-plugin-ibeacon? or we just have to leave the reference to lib commented out and it will work fine? I am using cordova-plugin-ibeacon in my project, but for background monitoring I want to use your plugin. I will change it according to my requirements.
Thanks!
Hi,
is there on exit region ?
Tks,
Hi Stephen @stephenrob,
I'm testing your library and first I would like to congrat you for such amazing job!
I could make it work when my app get in background. BackgroundBeaconService is being restarted however it does not "remember" the previous registred regions.
What I did to make it work was to register my regions again. But I think it's not the right way.
Do you have any ideia why I'm facing this. What I did wrong?
Your help will be very appreciated.
I have added your plugin.I am able to start the service and we are able to calling startMonitoringRegion and startranging in region but we are not getting any notifications.one more thing if i don't add ibeacon methods in frontend like didenter and didexit and didRangeBeaconsInRegion then it's not doing anything in background if i add those methods if even i kill the app it's still executing didRangeBeaconsinRegion from com.unarin.ibeacon plugin but it's not giving any notification but if the app is in foreground or background i am getting notification but if we close the app i am not getting.Can you help me how to use this plugin with ibeacon plugin to get the notifications if the app is closed and when we enter or exit from region.I have seen debug log it's not printing any thing regarding this plugin?
Hi, Do you have a plan to make the plugin generic which does not depend on the Library Journeys API? For example, BackgroundBeaconMonitoring.startService will have just two callback functions.
Thanks.
There is no callback fired for the requestPermissions method.
Currently the method definition is as follows:
cordova.requestPermissions(this, 0, PERMISSIONS);
This should use the status of requesting permissions to fire the correct callback to the cordova javascript layer.
Hi.
Is it possible use this plugin with ionic 2? If it is possible how can i add it to my project and use it?
Thanks.
I am able to monitoring in the background using this plugin Great Work you have done, but I am unable to get Notification from Background when I am entering in the Region and Existing from the same Region.
Please Find the Below Code working in Background:-
07-20 13:20:55.255 13361-13361/io.ionic.starter D/CycledLeScanner: Waiting to stop scan cycle for another 99 milliseconds
07-20 13:20:55.354 13361-13361/io.ionic.starter D/CycledLeScanner: Done with scan cycle
07-20 13:20:55.355 13361-13361/io.ionic.starter D/BeaconService: Calling ranging callback
07-20 13:20:55.355 13361-13361/io.ionic.starter D/Callback: attempting callback via intent: ComponentInfo{io.ionic.starter/org.altbeacon.beacon.BeaconIntentProcessor}
07-20 13:20:55.355 13361-13361/io.ionic.starter D/RangingData: writing RangingData
07-20 13:20:55.355 13361-13361/io.ionic.starter D/RangingData: done writing RangingData
07-20 13:20:55.359 13361-13361/io.ionic.starter D/CycledLeScanner: stopping bluetooth le scan
07-20 13:20:55.359 13361-13361/io.ionic.starter D/CycledLeScannerForLollipop: Stopping scan
07-20 13:20:55.359 13361-13361/io.ionic.starter D/BluetoothAdapter: STATE_ON
07-20 13:20:55.368 13361-13361/io.ionic.starter D/CycledLeScanner: starting a new scan cycle
07-20 13:20:55.369 13361-13361/io.ionic.starter D/CycledLeScanner: starting a new bluetooth le scan
07-20 13:20:55.369 13361-13361/io.ionic.starter D/CycledLeScannerForLollipop: starting non-filtered scan in SCAN_MODE_LOW_LATENCY
07-20 13:20:55.369 13361-13361/io.ionic.starter D/BluetoothAdapter: STATE_ON
07-20 13:20:55.373 13361-13372/io.ionic.starter D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=5
07-20 13:20:55.376 13361-13361/io.ionic.starter D/CycledLeScanner: Waiting to stop scan cycle for another 1100 milliseconds
07-20 13:20:55.376 13361-13361/io.ionic.starter D/CycledLeScanner: Scan started
07-20 13:20:55.378 13361-15584/io.ionic.starter D/BeaconIntentProcessor: got an intent to process
07-20 13:20:55.378 13361-15584/io.ionic.starter D/RangingData: parsing RangingData
07-20 13:20:55.378 13361-15584/io.ionic.starter D/RangingData: parsing RangingData
07-20 13:20:55.379 13361-15584/io.ionic.starter D/BeaconIntentProcessor: got ranging data
07-20 13:20:55.380 13361-13461/io.ionic.starter D/com.unarin.beacon: didRangeBeacons: {"eventType":"didRangeBeaconsInRegion","region":{"identifier":"deskBeacon","uuid":"b9407f30-f5f8-466e-aff9-25556b57fe6d","typeName":"BeaconRegion"},"beacons":[]}
07-20 13:20:55.382 13361-13361/io.ionic.starter W/cr_AwContents: Application attempted to call on a destroyed WebView
java.lang.Throwable
at org.chromium.android_webview.AwContents.isDestroyed(AwContents.java:332)
at org.chromium.android_webview.AwContents.isDestroyedOrNoOperation(AwContents.java:305)
at org.chromium.android_webview.AwContents.evaluateJavaScript(AwContents.java:582)
at com.android.webview.chromium.WebViewChromium.evaluateJavaScript(WebViewChromium.java:193)
at android.webkit.WebView.evaluateJavascript(WebView.java:994)
at org.apache.cordova.engine.SystemWebViewEngine.evaluateJavascript(SystemWebViewEngine.java:348)
at org.apache.cordova.NativeToJsMessageQueue$EvalBridgeMode$1.run(NativeToJsMessageQueue.java:368)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I have added your plugin, i can see it in my package.json but when I try to find it in my typescript code like : "console.log(cordova.plugins);" i don't see BackgroundBeaconMonitoring class and its method. How do you call BackgroundBeaconMonitoring in your app ??
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.