Comments (14)
The limits on background scanning are pretty much baked into the iOS implementation, i.e. monitoring only in background. The Android implementation has better control which I'm planning to expose shortly with frequency of scans and the like. If you are looking for instant notifications on an iPhone when the phone is asleep it's not going to happen any time soon.
from cordova-plugin-ibeacon.
is it possible to get an iPhone notification when the phone is active, but the app is not open?
from cordova-plugin-ibeacon.
My understanding comes from here http://developer.radiusnetworks.com/2013/11/13/ibeacon-monitoring-in-the-background-and-foreground.html
Which in a nutshell implies you get a chance to find a beacon immediately as you wake up your phone but otherwise won't come back quickly unless the app is foreground. Peter may have experimented more than me to confirm this.
from cordova-plugin-ibeacon.
Yes notifications do work when the app is not open. I have a working version using this library and have verified in the logs that this happens. @mrtree1 is correct ios does start monitoring when you click on the wake button or anytime your phone gets woken up. When you don't click on the wake button the cycle time is less frequent and can vary. What would be nice to have added to this library is to have the accuracy returned (distance from the beacon). I can see it in the log but it doesn't get returned back in the library. Another thing that would be nice is getting callbacks from startMonitoringSignificantLocationChanges. It apparently uses less resources and you don't have to always be ranging. Is that something that could be added?
Anyways just wanted to say this library rocks - thanks so much for all your work in this!!!
from cordova-plugin-ibeacon.
Hi all,
from what I read with ios 7.1 the background responsiveness got much better (http://beekn.net/2014/03/apple-ios-7-1-launches-major-ibeacon-improvement/). And that's also what I see on my test application. Even if the app is in background and the display off I get monitoring callbacks right away (at least entry events, exit with some delay). And you get like a 10 second window to do ranging.
Question to @petermetz: Is it possible to get the "measured power" returned back? Guess in the end that goes in the same direction as @rudy-tassuru question, as one should be able to approximate the distance having rssi and measured power.
And I can only echo: Great plugin, thank you!!!
from cordova-plugin-ibeacon.
@rudy-tassuru I'm back on my iBeacon project at the end of this week so the startMonitoringSignificantLocationChanges callback sounds like a really useful addition for me too. I will aim to submit to the v2.0 branch by end of week, if no-one else submits a pull by then.
@tobiasanger interesting info regarding 7.1. So if you start monitoring and ranging for a beacon you do actually get ranging responses via the plugin when in background? In which case the plugin works as is for iPhone, and I think it would be useful to match this behaviour on Android as background scanning is costly.
Regarding distance, adding the Tx value, has been on my do to list, so if @petermetz doesn't get there first I'll add to V2 later this week if no-one does sends in a pull request first.
from cordova-plugin-ibeacon.
Thank YOU guys, it is always good to hear that people are using it!
I opened two enhancement tasks for the distance data and startMonitoringSignificantLocationChanges respectively.
@mrtree1 I plan to work on it this weekend, but that was the plan for the previous one as well, to be completely honest. I didn't assign the two issues to anybody yet, let's just agree that if one of us starts on it, leave some mark on the issue itself (comment, assign, etc.).
I'm closing the issue, as it seems that every questions have been answered.
from cordova-plugin-ibeacon.
@petermetz same with me I'm juggling a few too many projects. I will certainly be doing some work later in the week so will mark what I'm doing when I start. As I mentioned I'm not sure having looked up the significantchanges call if its really that useful and is not related to beacons.
from cordova-plugin-ibeacon.
@mrtree1 Good stuff, let's hope the best for the weekend then.
I gave another thought to significant-location changes and I think you are right about it.
@rudy-tassuru I don't think you can exchange beacon ranging with the monitoring of significant location changes at all. Please correct me if I'm wrong there, but otherwise I think @mrtree1 is right and there is not much point in doing it.
from cordova-plugin-ibeacon.
Hi @petermetz and @mrtree1 you guys are right - I just re read apple's location awareness document and yes startMonitoringSignificantLocationChanges is not ibeacon related. I guess I was getting it confused with another post I saw about a person want to check startMonitoringSignificantLocationChanges and then seeing if there were any beacons close by in the area. Not to add more to your list hehehe but how difficult would it be to determine where a user is in a room based on a bunch of beacons?
from cordova-plugin-ibeacon.
@rudy-tassuru It's something I would like to add in my current project as well, but it's not core. The problem is two-fold:
- You need to store exact positions for each of your beacons either in your app on an API. Or mark them on your device when in contact/immediate distance, and visit all of them to create a net of positions. Without reference positions -even relative ones - you don't know the shape of the room.
- Signal strength for beacons which I've used can be pretty variable - so you need to smooth them AND do a rough distance calculation. Apple can give an estimate and there is Android code which does something similar. You would need to be aware there is an accuracy for these values which can be pretty poor and assumes the beacons are properly calibrated and have no obstructions between you and the beacon. If you have many beacons you have the chance to reduce the probable position error though overlapping the error ranges per beacon.
Looks like people have tried it with pretty poor results so far: http://stackoverflow.com/questions/20332856/triangulate-example-for-ibeacons
from cordova-plugin-ibeacon.
Sorry for commenting on a closed ticket.
@rudy-tassuru Would you be willing to provide a code example on getting notifications to show when the app is running in the background?
from cordova-plugin-ibeacon.
@dereckmartin I can for sure provide a code example. I will come up with something in a couple of days though as I am swamped.
I know that one of the biggest things that I had to do was enable region.notifyEntryStateOnDisplay = YES; (http://developer.radiusnetworks.com/2013/11/13/ibeacon-monitoring-in-the-background-and-foreground.html). It maximizes the responsiveness of beacon monitoring. Anyways I will come up with an example for you.
from cordova-plugin-ibeacon.
Do you have an example?
from cordova-plugin-ibeacon.
Related Issues (20)
- trying to use in Ionic/Capacitor env. , no response HOT 8
- what is the identifier used for? looking at all the underlying code it isn't used for beacon recognizing. HOT 2
- when debug is enabled, where is it viewable or stored? HOT 1
- how do I build another version of this library? HOT 1
- using thru Ionic-Native with Capacitor on android , Uncaught (in promise) TypeError: e.beacon.stopRangingBeaconsInRegion is not a function HOT 1
- i expect to see duplicates of beacons where there are multiple, but only see one.. am I doing something wrong? HOT 2
- is there a way to get the mac address of the beacon? HOT 1
- Does this plugin support android 9 and greater ? HOT 7
- Read custom field
- No beacons are found in Andoid 11 smartphones HOT 1
- exitRegion configuration timeout request
- Error: Importing IBeacon which does not have a ɵmod property
- Question: How can I decrease advertising interval as ibeacon device in android and ios?
- Sometimes Beacons within the range are detected differently. HOT 1
- Major and minor with wrong values HOT 1
- Compatibility with Android 12 HOT 4
- Add support of Android 12 (Google API 31) HOT 21
- Use plugin on iOS16+, there's no beacons response from callback! What does can we do on iOS16+
- cordova-plugin-ibeacon not working starting android 11 HOT 7
- Dependency missing in build.gradle for org.altbeacon:android-beacon-library:2.16.1 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-ibeacon.