Send signals through a headphone cable

I worked a bit on this, but found nothing.

I have an idea for a device management application that will need to be connected via a headphone cable.

Can I send signals through the headphone jack?

+3
source share
2 answers

Arbitrary data can be reproduced through an audio cable using Media Playerwith the source resource. The signal will be limited by the bandwidth of a particular device, for example, from 20 Hz to 16 kHz.

0
source

use AudioManager

AudioManager audioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);

http://developer.android.com/reference/android/media/AudioManager.html

WiredHeadsetOn (true) setMode

0

Source: https://habr.com/ru/post/1777764/


All Articles