Estimote Beacons
-
Hello
I have a project that needs to use the Estimote beacons experience. Doing some research, I found a cordova plugin that allows the use of these beacons. I have to say, I am a beginner using quasar and right now, I don´t know how to use this plugin.
https://github.com/petermetz/cordova-plugin-ibeacon
According to the simplest example, to generate a beacon I only need:
function createBeacon() {
var uuid = '00000000-0000-0000-0000-000000000000'; // mandatory var identifier = 'beaconAtTheMacBooks'; // mandatory var minor = 1000; // optional, defaults to wildcard if left empty var major = 5; // optional, defaults to wildcard if left empty // throws an error if the parameters are not valid var beaconRegion = new cordova.plugins.locationManager.BeaconRegion(identifier, uuid, major, minor); return beaconRegion;
}
but when I am trying to run this function, an error is thrown:
ReferenceError: cordova is not defined
How can I import cordova in my component? is it possible to use this plugin with quasar?
Thank for any help.
-
I’ll have a guess:
import cordova from 'cordova'
At the very top of that file.
If that generates an error, you might not have cordova installed. -
cordova
global is available by default when you run your project under cordova (so an app on phone/tablet). Will not be available, obviously in a browser. No need toimport cordova from 'cordova'
– actually, don’t do that. -
thanks for the help