Comments (7)
Not at all. It should work smoothly if you pass in null for major and minor.
Are you sure you are on the latest version of the code?
Can you please elaborate on the error that is being thrown? Is it a Javascript error on an Objective-C one?
Peter
from cordova-plugin-ibeacon.
Well, to be honest, I didn't try to pass null as an argument. I just didn't pass the minor or major parameter at all.
from cordova-plugin-ibeacon.
I just tried to pass null
with the following code:
var beacon = new window.IBeacon.CLBeaconRegion(uuid, null, null, identifier);
I now get the following error:
PS: When I omit the minor / major parameter a JS error gets thrown.
from cordova-plugin-ibeacon.
It was a bug indeed in the code. Huge thanks for the detailed explanation of the problem!
The issue should be fixed by 0e98d01 . Please let me know if it resolved the issue for you as well.
Regarding the PS:
If you are omitting it like this:
var beacon = new window.IBeacon.CLBeaconRegion(uuid);
Then it fails because the identifier is still a mandatory parameter, so the error being thrown is intended.
If that's not how you omitting the major/minor parameters, let's talk more about that case as well.
Peter
from cordova-plugin-ibeacon.
Well I think it would be worth a breaking API change and alter the order of the arguments to be really able to omit the minor/major params. Would be more convenient I guess.
from cordova-plugin-ibeacon.
Thanks for the suggestion. I reconsidered it and you are right.
The breaking change will be part of version 2.
from cordova-plugin-ibeacon.
Awesome! 👍
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.