6

My Android application is targeting non-rooted Samsung Galaxy Note 2 phones running Android 4.4.2.

When my USB microphone is plugged into the phone, it appears as /dev/snd/pcmC1D0c, so I know it is being recognizing as an audio capture device.

Is there a way to capture the Audio from this device into my app without rooting the Galaxy Note 2?

  • I tried AudioRecord with all the MediaRecorder.AudioSource options and they all use the phone's internal mic.
  • I did not find any option in Settings/Sound to change the input device.
  • I investigated Samsung's Professional Audio SDK and it looked very promising until I found the Galaxy Note 2 device I am targeting is unsupported by this SDK.

If there is no way to access it from Java, is it possible to use native c code (JNI) to access the existing tinyALSA driver and capture the audio without rooting the phone?

I know I can use use libusb to capture the audio packets directly, but I was hoping for an cleaner/easier way since the phone already recognizes my audio input device.

JFar
  • 423
  • 4
  • 13
  • please reply to this comment when you get an answer (to let me notified) – Mohammad Ersan Nov 22 '14 at 19:09
  • @JFar Any luck with this ? I am facing the same issue. Is there any workaround you followed ? Thanks ! – dev Aug 29 '15 at 18:44
  • @SlowAndSteady nope, I ended up going the native c code (JNI) route and got it working that way. A bit of extra work, but solved my problem in the end. As a starting point for learning, I dug into this project: https://github.com/shenki/usbaudio-android-demo – JFar Sep 05 '15 at 17:09
  • Good to know. Thanks for the link ! – dev Sep 05 '15 at 17:14

0 Answers0