1

I am trying to investigate if it is possible to get hold of audio stream on android device (for example android tv) which I can use for some purpose from inside my app (my app can be system app). Lets say something is playing on an android device (it could be anything that use the audio part of an android device). From my application , I would like to intercept the audio stream to analyze it, to record it, etc.

Any advice is appreciated.

Sushil
  • 8,250
  • 3
  • 39
  • 71
  • Take a look at: http://xzpeter.org/?p=254 and http://stackoverflow.com/questions/15125139/android-get-device-overall-audio-output-in-pcm – davidgiga1993 May 21 '15 at 12:34
  • @davidgiga1993. thanks for your comment. I will have a look at them. – Sushil May 21 '15 at 12:42
  • The difference here is that there's a hint that the normal Android security model doesn't apply ("my app can be system app") perhaps because this is running on oddball hardware that wasn't really secured to begin with. So this may be less a "you can't do that" question than a "there's no portable way to do it, but for a given Android port you can figure out how" - ie, look at the source of the applicable audio layers, see if you are lucky enough to have one that backends through ALSA or something standard-beyond-Android like that, look at audio-related kernel drivers, etc. – Chris Stratton May 21 '15 at 12:57
  • @ChrisStratton.. thanks for your reply. I understand what you mean to say but, as I am not too much aware of that part of code and flow, its difficult to figure out. Still, I will try to find, if I get a place from where I can put a hook and bring the stream to my java world in my app. In any case any suggestion would highly appreciated. – Sushil May 21 '15 at 13:21

0 Answers0