GitHub - jamrader/XTAudioBeacons: Audio beacons can synchronize and/or relay data to devices through a variety of broadcast media. This data-over-audio method uses sound waves in a similar way to how Bluetooth employs electromagnetic waves.

NOTE: THE GITHUB VERSION OF THIS LIBRARY HAS BEEN DEPRECATED. For inquiries about the latest commercial SDK, please email hello@cueaudio.com

This is a protocol for relaying data through inaudible, ultrasonic sound waves, essentially converting any speaker into an “Audio-Beacon.” This communications protocol utilizes sound waves in a similar way to how Bluetooth employs electromagnetic waves, offering an alternative method for transmitting data for both iOS and Android.

Advantages include:
XT Audio Beacons have been enjoyed by over 1,000,000 users across three continents. Some of our clients include the following:

Synchronization
Villanova @ Purdue | Iowa @ Purdue | Villanova @ Marquette

If the provided demo app is in open on your device, playing the following links from your desktop will trigger various events.

How it works

Any speaker can become an XT Audio Beacon. XT Audio Beacons are powered by ultrasonic fingerprints, each of which is composed of a permutation of inaudible tones lasting between 0.0005 and 0.002 seconds. The duration of the fingerprint is variable and depends on the amount of data relayed — typically a complete trigger lasts anywhere from 0.30 to 2.0 seconds. Over the course of a second, thousands of bits of data can be relayed. Our ultrasonic signals are concentrated between 16-22 kHz to minimize conflict with environmental noise and to remain human-inaudible. This means that any audio containing our triggers must be in a format that supports high-pitch frequencies (e.g., WAV) and should not be converted or compressed into a lesser format (e.g., MP3).

Ultrasonic fingerprints can be generated to the point where single-use/throwaway triggers can be utilized for authorization and validation purposes, such as check-ins, private keys, and even payment processing.

To receive WAV files beyond those included in the starter pack, please contact hello@cueaudio.com. Unique WAV files for check-in and authorization purposes can also generated upon request. Please allow up to 24 hours for a response.
Note: before publishing an app containing the XT Ultrasonic Fingerprint framework, please make sure you’ve read the FAQ and terms & conditions located here.

iOS

(1) Add #import <XT/XT.h> to your header file and make your UIViewController a subclass of XTUltrasonicsViewController.

(2) Set the XTdelegate of the XTUltrasonicsViewController, typically self.

(3) Implement the method

- (void) didHearTriggerWithTitle:(NSString *)title andAmplitude:(float) mag

The amplitude measure can be used as a rough indicator of proximity to the outputting speaker.

(4) To get a list of trigger titles, call the method [self logTriggerTitles] on the XTUltrasonicsViewController subclass.

An unlimited number of triggers and trigger titles can be generated, even to the point of creating “throwaway” triggers for authorization and check-in purposes. If more triggers are needed than the default number listed by calling logTriggerTitles, simply contact hello@cueaudio.com for customization.

(5) (optional) To control the UILabel and UIActivityIndicator at the bottom of the screen, use the methods

To stop the label and activity indicator from appearing when the view loads, overwrite the method - (void) microphonePermissionGranted and do not call [super microphonePermissionGranted].

Android

(1) Add the xt.aar file to libs in your app directory. See here

(2) Add flatDir { dirs 'libs' } to repositories in your top-level build gradle. See here

(3) Subclass XTUltrasonicsActivity and implement the method public void didHearTriggerWithTitle(String title) andAmplitude:(float) mag. The amplitude measure can be used as a rough indicator of proximity to the outputting speaker.

(4) To get a list of trigger titles, call the method logTriggerTitles() on the XTUltrasonicsActivity subclass.

An unlimited number of triggers and trigger titles can be generated, even to the point of creating “throwaway” triggers for authorization and check-in purposes. If more triggers are needed than the default number listed by calling logTriggerTitles(), simply contact hello@cueaudio.com for customization.

(5) Request microphone permission. This can be handled automatically for you by setting handleRecordPermissionsForMe = true in OnCreate. To handle recording permission yourself, set handleRecordPermissionsForMe = false in OnCreate.

To change the text presented during the microphone permission request process, simply set the following (public static) strings in OnCreate:

Add to your manifest file:

(6) (optional) To control the TextView at the bottom of the screen, use the methods

To stop the TextView from appearing when the view loads, overwrite the method public void microphonePermissionGranted() and do not call super.microphonePermissionGranted().

https://github.com/jamrader/XTAudioBeacons