Stop media player on phone turned over - android

I'm doing an app that has a media player working on notifications , and I want to be able to mute/stop, When the phone is turned over or the screen is covered.
Can anyone give me pointers how to implement This, many thanks.

Related

disable screen record with sound in flutter

I am trying to disable screen record and screenshot in my flutter app and I already did using flutter_windowmanager package.
my problem is with screen recording, the sound of the video inside th app is still running and recorded by screen recording !
any suggestions for also preventing sound record ?
No. If your app is playing loud enough the microphone can hear it, it can be recorded. There's no way to prevent that- algorithmically canceling out sound from one source in an audio recording like that would be difficult, if not impossible. Nor would it really buy you all that much- they could always just hold an external mic up to the phone (they can also just capture your app with a second camera, which makes removing video recording also of limited use, if done to prevent a user from recording).
The one thing you could do is claim the mic yourself and not give it up. But that would be annoying to anyone actually using your app. And wouldn't rpevent capture with an external device of course.

how to check if microphone is turned on or off

all I am working on an app,where I just want to check if microphone is on or off.
i.e when the microphone is recording audio,it should show on.when it is not it should show off.
How to check whether microphone is used by any background app
I tried this and also saw about AudioRecorder in android developer site.But I am not getting it right.Can anyone help me??Thanks in advance .
Edit:
can anyone suggest how to run it in background

Android - detect if speakers are playing audio programmatically

I'm working on a diagnosis app for android, I want to test whether the speakers are working fine or not. I thought the way to do this is to play a sound and check whether the speakers are playing the audio or not. I looked for code but didn't find anything useful. How can this be achieved in android? Is there a better way to do the same thing?

Record Sound and modulate into different Effects

I am working on android app in which i want to do similar work as Voicechanger App which is available on playstore.
I know how to record sound from mic but i don't have any idea of how to change the recorded sound to the different effects like Robot, Mega phone etc .
Any help in this regard will be appreciated. Thanks in advance.

Android Find Phone App

I am playing around and I am trying to make a Android find phone app like the onces in the market place. if someone text my phone "beep" I want the phone to make a loud sound and if the phone is on silent i still want the sounds. I was thinking to use a alarm but the alarm does not make sound. can someone give me some
you are right... try out to invoke media player. because Media player always work immaterial to phone ringer. Something like this http://www.anddev.org/video-tut_-_playing_mediamp3_on_the_emulator-t156.html

Categories

Resources