Giter Club home page Giter Club logo

Comments (8)

jkurdel avatar jkurdel commented on August 26, 2024

Hi @zkenstein

What do you mean by that?

from beaconcontrol.

zkenstein avatar zkenstein commented on August 26, 2024

Hi @jkurdel,

If I plan to use the backend with the hybrid app (Cordova or Ionic) is there any plan to release the plugin for this?

Thanks

from beaconcontrol.

botmonster avatar botmonster commented on August 26, 2024

Hi @zkenstein,
Currently we provide plugins for native apps - this may change in future. You can alway implement BLE plugin for Cordova/Ionic https://github.com/don/cordova-plugin-ble-central to be able to receive device ID and then use our REST API to control beacons with known ID's https://beaconcontrol.io/dev/backend-docs - which is not complicated solution.

from beaconcontrol.

mhd999 avatar mhd999 commented on August 26, 2024

Hi @botmonster @zkenstein i guess the plugin ble-central is meant to BLE communication when you can use https://github.com/petermetz/cordova-plugin-ibeacon made for iBeacon where you can monitor and range devices.

But am not sure which the API you need to call when you first get a beacon in a range I have read the docs but still can't figure it out can you please help @botmonster !

from beaconcontrol.

mhd999 avatar mhd999 commented on August 26, 2024

Hi! @zkenstein @botmonster Regarding to the second part of my previous comment about which API should hit to deliver the events it's/events api however, I still think there is no clear way to understand the how things are working unless you know about how the iBeacon protocol well.

And follow the SDK code, work flow digram might solve this issue.

from beaconcontrol.

brandecho avatar brandecho commented on August 26, 2024

Hi @zkenstein @botmonster @mhd999 . Was anyone able to figure out the entire code that would monitor ibeacons within range of the UUID by making an ajax request to the "GET /s2s_api/v1/beacons" api, and based on the results (major, minor, promimity id, late, lng etc.), and then an "if" statements that would make another Ajax post request to the notifications api? It would be really helpful if someone could the code for such a Scenario. Thank you in advance.

from beaconcontrol.

brandecho avatar brandecho commented on August 26, 2024

So far I found this resource that will help in ranging/monitoring Ibeacons that are hard coded into the client, which is not the ideal solution unless you use a third party service like Ionic Cloud's Deploy service or MicroSoft's CodePush to update files in Cordova "www" folder to update the .js file with the ibeacon information. Although not a complete solution to my previous question, still need to figure out the "if" statement once an ibeacon is in range to send an ajax post request to fire the action. https://evothings.com/quick-guide-to-writing-mobile-ibeacon-applications-in-javascript/

from beaconcontrol.

mhd999 avatar mhd999 commented on August 26, 2024

Hi @brandecho you may want to add which SDK/Plugin you're using.

Since this issue opened for Cordova based app, and if your using Ionic 1 then this code should do the work for you or you can use vanilla javaScript instead if you are not using Ionic 1 and Angular.

Plugin: https://github.com/petermetz/cordova-plugin-ibeacon

Fetch your beacons and ranging them:

$http({
  method: 'GET',
}).then(function(beacons){
   beacons.forEach(function(beacon, index) {
      				    $window.cordova.plugins.locationManager.startRangingBeaconsInRegion(createBeaconRegion(beacon.id, beacon.uuid, beacon.major, beacon.minor, true));	
    })
}, function(response){/*LOG ERROR*/}

Monitor Enter/Exit event:

delegate.didEnterRegion = function (pluginResult) {
  $timeout(function () {		
         $window.cordova.plugins.locationManager.startRangingBeaconsInRegion(createBeaconRegion(pluginResult.region.identifier, pluginResult.region.uuid, pluginResult.region.major, pluginResult.region.minor, true))
  .fail(function(e) {/*LOG ERROR*/})
  .done(function(){delegate.didRangeBeaconsInRegion = function (pluginResult) {}})
  });
};

from beaconcontrol.

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.