How to use the co.mobiledatasystems.tibeacon.initializeBeaconMonitoring function in co

To help you get started, we’ve selected a few co examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tipsy-and-tumbler-ltd / TripLogr / Resources / iphone / alloy / controllers / Settings.js View on Github external
function initBeacon() {
        TiBeacon.initializeBeaconMonitoring({
            success: function(e) {
                Ti.API.info("success: " + JSON.stringify(e));
                beaconsRegistered();
            },
            error: function(e) {
                Ti.API.error(JSON.stringify(e));
                alert("This device doesn't support iBeacons");
            },
            region: function(e) {
                Ti.API.info("region changed event: " + JSON.stringify(e));
                ("Immediate" === e.proximity || "Near" === e.proximity) && TiBeacon.sendLocalNotification({
                    message: "Looks like you might be ready for a new journey! Tap to start logging with TripLogr.",
                    sound: "/sounds/honk.mp3"
                });
            },
            ranged: function(e) {