Home » Android » audio – Transfer data over sound in Android

audio – Transfer data over sound in Android

Posted by: admin May 14, 2020 Leave a comment

Questions:

I want to transfer data over sound(eg : text). But I can’t find anyway to resolve this problem. Program will no need connect Internet.
Can anyone help me?

How to&Answers:

Edit/Update:
Found this new option, it has bluetooth low energy functionality also, though still seems an exciting development in the data via sound prospect:

Sonic Notify:

Sonic Notify beacons combine three technologies: Sonic Notify Audio,
iBeacon, and Android BLE technology to reach 95% of smartphones. The
range and options of the beacons’ coverage are configurable via our
back end beacon management system.

Searching for more docs, if available, on the same.
Update: Available documentation


I have done it using this library and SDK: NearSDK from NearBytes, found it quite reliable.

NearSDK is a communication solution that uses the NearBytes Mobile SDK

The dependency being you will need this to send the data and at the other end, to listen.
For eg.

To send:

nearBytes = new NearBytes(YourActivity.this);
nearBytes.send(NearBytes.stringToBytes("string"));  

To listen:

nearBytes = new NearBytes(this);
nearBytes.startListening();
nearBytes.setNearBytesListener(new NearBytes.NearBytesListener() {
                    public void OnReceiveError(int code, String msg) {
                    }

                    public void OnReceiveData(byte[] bytes) {
                     String msg = NearBytes.bytesToString(bytes);

                    }
                });  

You can find the details at:
Integrating the NearBytes SDK in an Android application
and
NB Dev area