Android background app - android

Is it possible for an android app running in the background to access the sound being produced by a media player (to be used for recording to another file, streaming etc)? Will the app read from the sound port? How will this work if it is possible? Any existing apps?
Appreciate any help/pointers.

No.
Or more precisely: on an unmodified Android device there is no audio loop back or pass through functionality.
http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html lists all the audio sources available to the MediaRecorder and AudioRecorder classes.
Now, if you are willing to write a device driver and have the capacity to root the target device and load your driver on it you could possibly implement a loop back driver, a pass through driver or (much more interesting) an alternative audio output device that would perform your streaming/recording and then forward to the regular audio output.

To caputre a Sound-Output form the Android Device, you can use the MediaRecorder-class, like shown in this tutorial.
But recording a Sound-File, which already exists (on the SDcard ore something) doesn't make any sense to me.

Related

How to record audio using adb?

I have this project, that I need to record the sound played on my android devices. I know how to use ADB to do screen recording, but it has no audio with it.
I searched for answers and I suppose there is something called "tinycap" and "teesink" which is used for audio recording?
I am using windows platform, I don't know how to perform tinycap or teesink.
https://source.android.com/devices/audio/debugging
Can somebody tell me how to record audio on my android devices directly without using thrid-party apps?

Audio input through USB in Android

I have been wondering, on how to capture Audio inputs through USB in Android.
My scenario is to receive audio through external hardware and play that received audio through android app. This transmission is to be done over USB.
Is there any way to do this using Android SDK / Android NDK.
Any suggestion will be helpful to me.
Task Done Right by time I am able to interact with Hardware using CDC class and also able to play some random noisy audio through USB in my app. Neither I am able to get clear sound by that approach, nor there is consistency within the transmission of audio.
Thanks.
Regards, Vivek
Most modern Android devices can act as USB host. So you can connect e.g. USB microphone for capturing the audio. Android also contains support for usb_audio class. Use that to get access to the audio on the device.
Since you have already experimented with Communication Device Class (CDC), you are aware of Android's USB host functionality. Now you need to ensure your peripheral has implemented USB audio class (the audio source part) and make your app to use the audio class to obtain the audio. This pretty well explained here, so it does not make sense to copy all the information to this post. If you are already using audio class, that page may explain some of the issues you have (e.g. using wrong format).
USB Audio class specifications can be found at USB.org website. The problem with those is that Audio class is pretty large and Android probably does not support everything.

Android recording an apps sound output

Hello guys I have a question
I have to admit before I ask my question I never used Android Sdk before but I have coded java for couple of years.
I have a fm radio app.It's an internet radio and I want to record it's output. Is it possible to use an external app to record some other app's output? And if yes, It also has some pre recorded shows which you can listen within the app. They do not get saved into my device when I listen however is it possible to download those shows? Like finding source of the audio and downloading it using my external app.
I'm pretty sure that the recorded shows are downloaded from the internet. I know some audio grabbers as browser extensions in Pc. So I'm asking, if such thing is possible in Android as well.
See below:
https://stackoverflow.com/a/25741006/850347
Seems to be currently there is no way to achieve this. I have read this article and it suggests to recompile the Android source code with some changes.
Or, you can use visualizer.
https://stackoverflow.com/a/25816052/850347
The closest API available to you for these purposes is Visualizer. Which only captures "partial and low quality audio content".

Realtime Audio Convolution on Android

I'm trying to design an Android app that will start a service which applies a reverb (using convolution) to any audio played through the phone regardless of the app the audio is coming from. The service would ideally run in the background and enable the reverb effect as soon as audio begins to play on the device.
Is something like this possible on a non rooted Android device, and if it is, where's the best place to get started?
Thanks
It is not possible without root access.
There is some example of real time convolution such as viper4android fx though it uses linux native driver to achive the problem.

How can I capture the raw audio stream on an android device?

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.

Categories

Resources