Giter Site home page Giter Site logo

Comments (6)

pipozoft avatar pipozoft commented on June 11, 2024

I've been experiencing the same issue, it will be nice if the app monitors the region in background, that way we can notify users when entering/exiting a region.

from cordova-plugin-ibeacon.

morrissinger avatar morrissinger commented on June 11, 2024

It is possible to do this with the plug-in. The one catch I seem to be having is that if the app is close for a significant period of time, it no longer monitors the regions that I specified. However, if the app is recently closed, or is in the background, it can monitor regions just fine by following the example in the documentation.

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on June 11, 2024

@sunsus To my knowledge, iOS stops ranging when the app is in the background, so the plugin has no way to make that possible. Well, maybe with Core Bluetooth it is possible to emulate similar behaviour, but that's out of my reach at the moment.

@pipozoft @morrissinger You guys are talking about monitoring, not ranging, right?

from cordova-plugin-ibeacon.

pipozoft avatar pipozoft commented on June 11, 2024

@petermetz yes monitoring, I'm trying to make it alert me with a local notification (using other plugin) when I enter and exits the region. For that the app needs to be in the background and continue monitoring.

Also I don't know if it's my beacon but even if my phone it's next to it, it keeps saying that it's outside the region. Al thought ranging says the beacon is right next to me.

from cordova-plugin-ibeacon.

petermetz avatar petermetz commented on June 11, 2024

@pipozoft Can you try enabling debug notifications please?

It's not very well documented (yet) but the plugin supports posting local notifications for debug purposes, out of the box from the native layer, whenever an enter/exit event is received from iOS.

This means if you call locationManager.enableDebugNotifications() before you start monitoring, you should see local notifications about the exit/entry events. If those don't pop up, then it means the native layer never received the events you are waiting for, and that's why the plugin doesn't know anything about them either.

If the notifications pop up, but your DOM delegate methods are not fired, that usually means a bug in the plugin's transport layer.

I hope this helps.

Peter

from cordova-plugin-ibeacon.

morrissinger avatar morrissinger commented on June 11, 2024

@petermetz -- I am talking about monitoring. Everything that I read suggests that ranging in background or on a closed app state is completely impossible, with the exception of one article I read from Apple (which I will link if I can find it again) that says it is "generally" not possible.

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.