Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

ofxiBeacon

openFrameworks addon for handling iBeacon.

Initialize

ofxiBeacon(const string &uuid, const string &serviceIndentifier, bool debug);

.h

class ofApp : public ofxiOSApp {

    public:
        ofxiBeacon iBeacon;
};

.mm

void ofApp::setup(){
    string uuid( "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" );
    string serviceIndentifier ( "com.example.yourapp" );
    ofxiBeadon();
    iBeacon = ofxiBeacon(uuid, serviceIndentifier, true);
}

if debug is true, sending beacon info to LocalNotification.

methods

BeaconInfo updateBeaconInfo();

.h

class ofApp : public ofxiOSApp {

    public:
        BeaconInfo beaconInfo;
};

.mm

//--------------------------------------------------------------
void ofApp::update(){
    beaconInfo = iBeacon.updateBeaconInfo();
    string kind = beaconInfo.status;
    string status = beaconInfo.status;
    string uuid = beaconInfo.uuid;
    int major = beaconInfo.major;
    int minor = beaconInfo.minor;
    double accuracy = beaconInfo.accuracy;
    int rssi = beaconInfo.rssi;
}

LICENSE

This software is released under the MIT License, see LICENSE.md

About

openFrameworks addon for handling iBeacon.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published