Soundify

Additional

Language
Java
Version
N/A
Created
Aug 10, 2016
Updated
Nov 16, 2016
Owner
Raphael Fuchter (RF177)
Contributor
Raphael Fuchter (RF177)
1
Activity
Badge
Generate
Download
Source code
APK file

Announcement

Soundify - Data transmission via sound waves

Soundify Library tries to offer to you the data transmission via sound waves. This library specifically makes the transformation and transmission of certain information into sound waves in the application that it is implemented and also makes the receipt of the same information transmitted. It uses the same concept as Chirp.io technology.

Support for Android 4.0.3 and up.

Feel free to fork or issue pull requests on github. Issues can be reported on the github issue tracker.

Soundify | ---- | ---- |

Table of Contents

  1. Setup
  2. Using Soundify
  3. Initialize a Instance
  4. Send Data
  5. Receive Data
  6. Others
  7. Additional Options
  8. FAQ
  9. Potential Improvements
  10. License

Setup

The easiest way to add the Soundify library to your project is by adding it as a dependency to your build.gradle

dependencies {
  compile 'com.github.rf177.soundify:soundify:0.0.1'
}

To declare that your app requires audio permissions, add the following to your AndroidManifest.xml, inside the bottom of the <manifest> element.

<uses-permission android:name="android.permission.RECORD_AUDIO"/>

Initialize a Instance

The first step is to initialize a Soundify library instance, and pass as a parameter the context of your Activity.

Soundify soundify = new Soundify(this);

Send Data

soundify.send(Soundify.stringToBytes(msg));

Receive Data

For a basic implementation to receive data, you'll need to:

  1. Start listening;
  2. Implement an SoundifyListener.
  3. Convert bytes receive in your data type.
  4. Use the data you received the way you want it.

In order to receive the data, you will need to implemente the SoundifyListener, typically this will be the Activity or Fragment.

soundify.startListening();
soundify.setSoundifyListener((data) -> {
 String stringData = Soundify.bytesToString(data);// Example of convert bytes to string
 // Use the data you received the way you want it 
});