No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Estimote Beacons

    Framework
    3
    4
    1420
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      okmkey45 last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • benoitranque
        benoitranque last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • rstoenescu
          rstoenescu Admin last edited by

          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 to import cordova from 'cordova' – actually, don’t do that.

          1 Reply Last reply Reply Quote 0
          • O
            okmkey45 last edited by

            thanks for the help

            1 Reply Last reply Reply Quote 0
            • First post
              Last post