Android > 4.0 : Ideas how to record/capture internal audio (e.g. STREAM_MUSIC)? Android > 4.0 : Ideas how to record/capture internal audio (e.g. STREAM_MUSIC)? android android

Android > 4.0 : Ideas how to record/capture internal audio (e.g. STREAM_MUSIC)?


You must pass audio traffic through your local socket server:

  1. Create local socket server

  2. Modify audio http stream address to path is thru your local socket server, for example for address

    http://example.com/stream.mp3  ->http://127.0.0.1:8888/http://example.com/stream.mp3

    where 8888 is your socket port.

  3. Play

    http://127.0.0.1:8888/http://example.com/stream.mp3 

    with default media player

  4. Read all incoming requests to port 8888 in your local socket server, analyze it and pass to example.com server.

  5. Read response from example.com and pass it to local client (media player). HERE you can capture audio stream!