Skip to content

Latest commit

 

History

History
130 lines (90 loc) · 2.11 KB

GETTING_STARTED.md

File metadata and controls

130 lines (90 loc) · 2.11 KB

Getting Started

English | 한글

Euphony is a library that transmits data using critical bandwidths of the tonal frequency inaudible to humans.
Since the API is written in Java, users can use it in any language running on JVM like Java or Kotlin.

This consists of two parts.

  1. Transmitter
  • Generate sound waves and transmits through a speaker.
  1. Receiver
  • Listen to sound waves and receive data through a MIC.

in Transmitter


Generate sound waves and transmits though a microphone.

  1. Create EuTxManager object which turns data into sound waves.
  • Java
EuTxManager mTxManager = new EuTxManager();
  • Kotlin
val mTxManager = EuTxManager()
  1. Use euInitTransmit method, enter the data you want to transmit.
  • Java
mTxManager.euInitTransmit("Hello, Euphony");
  • Kotlin
mTxManager.euInitTransmit("Hello, Euphony")
  1. With process method, set how many times to repeat the sound(data). (-1 is infinite)
  • Java
mTxManager.process(-1);
  • Kotlin
mTxManager.process(-1)

in Receiver


Part of receiving sound waves.

Requires permission of RECORD_AUDIO

  • Write in AndroidManifest.xml
<uses-permission android:name="android.permission.RECORD_AUDIO" />
  1. Create EuRxManager object that receives sound waves as data
  • Java
EuRxManager mRxManager = new EuRxManager();
  • Kotlin
val mRxManager = EuRxManager()
  1. Listener settings that receive and process sound waves
  • Java
mRxManager.setAcousticSensor(new AcousticSensor() {
	@Override
	public void notify(String letters) {
		// when data is received
	}
});
  • Kotlin
mRxManager.acousticSensor = AcousticSensor { letters ->
	//when data is received
}
  1. Start receiving sound waves
  • Java
mRxManager.listen(); // Listening Start
  • Kotlin
mRxManager.listen() // Listening Start
  1. End sound wave reception
  • Java
mRxManager.finish(); // Listening finish
  • Kotlin
mRxManager.finish() // Listening finish