Search code examples
androidaudioandroid-mediaprojection

How to use the MediaProjection API, from Android, to record system audio that is outputted in an android device?


Please, I liked to know how to use the MediaProjection API, from Android, to record system sound that is outputted in an android device? The system sound, that I want to record, is outputted from some user app, in speakers, or in headsets, from an android device.

Attention:

"Please, I don't want to record, or to capture, the screen with the MediaProjection API from Android, but I want to record the system sound with it."!

"Please, I want some code lines in Java, explaining how to use the Media Projection API from Android, too."!

The MediaProjection API webpage is: http://developer.android.com/intl/pt-br/reference/android/media/projection/MediaProjection.html, in Portuguese-Brazilian language. And, in the English language, it is: http://developer.android.com/reference/android/media/projection/MediaProjection.html.

Thanks for some help.

Best Regards,
dsfbi_13052013.


Solution

  • I liked to know how to use the MediaProjection API, from Android, to record system sound that is outputted in an android device?

    Sorry, but that is not possible. The media projection APIs do not record audio.

    I don't want to record, or to capture, the screen with the MediaProjection API from Android

    The only use of the media projection APIs are "to record, or to capture, the screen".