Code Monkey home page Code Monkey logo

Comments (14)

mrtree1 avatar mrtree1 commented on May 26, 2024

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.

NoahHines avatar NoahHines commented on May 26, 2024

is it possible to get an iPhone notification when the phone is active, but the app is not open?

from cordova-plugin-ibeacon.

mrtree1 avatar mrtree1 commented on May 26, 2024

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.

rudy-tassuru avatar rudy-tassuru commented on May 26, 2024

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.

tobiasanger avatar tobiasanger commented on May 26, 2024

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.

mrtree1 avatar mrtree1 commented on May 26, 2024

@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.

petermetz avatar petermetz commented on May 26, 2024

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.

mrtree1 avatar mrtree1 commented on May 26, 2024

@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.

petermetz avatar petermetz commented on May 26, 2024

@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.

rudy-tassuru avatar rudy-tassuru commented on May 26, 2024

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.

mrtree1 avatar mrtree1 commented on May 26, 2024

@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:

  1. 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.
  2. 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.

dereckmartin avatar dereckmartin commented on May 26, 2024

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.

rudy-tassuru avatar rudy-tassuru commented on May 26, 2024

@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.

sebastianh84 avatar sebastianh84 commented on May 26, 2024

Do you have an example?

from cordova-plugin-ibeacon.

Related Issues (20)

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.