How to detect when another app uses audio output? - android

I am working on a radio application and I am facing a problem that is: while my application is running and using audio output, if another application used the audio output, the sound then overlaps. I need to turn off my application's media player once the audio output is used by another application. How to detect when the audio output is used by another application?

Related

How to write an Android audio effects unit

I want to write an Android app which acts as an audio effects unit for whatever audio is playing on the device. So it would intercept the currently playing audio data and be able to modify it before it's output. Is that possible?

Android capture internal (application) audio

I want to capture internal audio, programmatically. For instance, I want to play an audio file (on my device) and then capture the audio output - not using the microphone with the volume turned up.
Example use case: I want to make a library that other developers can use in their games, allowing users to record in-game audio.
Android says there is Playback Capture functionality, however, I just cannot find an example. I've googled for hours. Whenever I google 'android capture app sounds' or 'android record audio', I either get links to voice recording apps or some code recording from the microphone (usually nearly 10 years old)... e.g
Does anyone have a link to a working example?
You can reference MediareCorder with https://developer.android.com/guide/topics/media/mediarecorder

How can I record a video with sound of my app using Android Studio?

I am developing an app with Android Studio 2.1 and I would like to record a video of an usage example, with sound.
I have already recorded some videos, but always without sound. As the sound in my app is a key feature, I would like to have the video with the audio output of my app.
Is it possible? In case it is, how could I use it?
Thanks!
Maybe you should try using external app for recording both screen and sound. I have dig in just few mins and i have found some apps.
Here I left link to a top http://www.androidauthority.com/best-screen-recording-apps-600838/
The last one seems to be the one you are looking for (SCR Screen Recorder, which requires root), hope it works!
Other option could be to use a male to male audio cable and record the audio transmitted to the pc.

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.

Qt Android : How to properly manage media playing in background

I'm developing a webradio app in qml with Qt 5.2. To play my radio stream I use a MediaPlayer qml element. This method allows to keep music playing when the user goes in other application, that's what I want. However when the user play an other media my radio stream doesn't stop and so there is two media playing in the same time.
I have checked with other media player app, this behavior is not normal in android. Normally the first media should automatically be paused when a second one starts playing.
Does anyone know how to reproduce this behavior with in Qt ?

Categories

Resources