Coder Social home page Coder Social logo

soundify's Introduction

Soundify - Data transmission via sound waves

Android Arsenal

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	
});

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.