GithubHelp home page GithubHelp logo

lulibrary / background-beacon-monitoring Goto Github PK

View Code? Open in Web Editor NEW
8.0 5.0 10.0 165 KB

Cordova Plugin to allow background monitoring of beacons and sending interactions to Library Journeys server

License: Apache License 2.0

Java 94.49% JavaScript 5.51%
cordova-plugin monitoring altbeacon altbeacon-library background-monitoring

background-beacon-monitoring's People

Contributors

stephenrob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

background-beacon-monitoring's Issues

Question - working with cordova-plugin-ibeacon

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!

How can i use it with ionic 2?

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.

No success or error callbacks for request permissions

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.

background monitoring not giving didenter or didexit notifications in android?

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?

generic version

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.

Is notification not getting from Enter/Exit Region in Background Mode ?

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)

Can't find BackgroundBeaconMonitoring

@stephenrob

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 ??

Remember previous registred regions when app is in background

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.