Android 3.2 VideoView freezes, audio carries on - android

I'm streaming HLS, and after 10 minutes or so, the video hangs but the audio stays on. I can then not click anything other than holding the home button to get the task manager to force close the app. Anyone know how to fix this?

Related

Can you pause all apps making an audio output in Android Studio?

I was wandering if it would be possible to pause all audio outputs in Android Studio.
As an example, let's say you were listening to Youtube Music or Spotify, what code wouldbe able to pause them. Not mute them. Pause them. Additionally, if it's possible could you make it that it goes back a few seconds (etc. 5s or 2s). Also, I would like it not to require to use any API's as I'd like it to be universal but if that's not possible, I would like it to be able to pause and revert a few seconds in Youtube Music (Premium) and the default Android Music Player.
Thank you.

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 keep recording video when device is locked?

I'm working on a video recording app designed to keep recording despite interruptions (phone calls, etc.). My use case would be a user in the app pushing a button on screen to start a recording, and then at some later time manually locking the phone. I'm trying to keep the app recording video even while the phone is locked.
On devices running earlier versions of Android (tested on Android 4.1, DROID 4), the video recording keeps going when the phone has been locked. Testing on various devices, I have been unable to get the video to continue recording on any Android version past 4.1. On devices past 4.1, the video stops recording, but the audio still continues recording, while the last video frame stays on screen.
Is there any way to keep the app recording when the user locks the phone?
Basically, lock screen does not affect the working of services in an application. So if you use a service, then your recording will proceed. check out this link for more information:
Android app video recording when screen off

Music stops playing on certain devices and keeps playing on others

Hi everyone I recently made an application that is actually a media player of a football club ultras music. I tested it on my phone (Motorola X running Android 4.4.4) when i go back to the dashboard the music keeps playing and everything is OK. But I had a review that on Samsung Trend Plus running Android 4.2.2 the music stops playing when going back to dashboard. I didn't know what may cause this issue? any ideas? Thanx
Most likely your problem is with audio focus. On certain system, when user go to the dashboard, the launcher might take audio focus (and pause your audio play) to play its launch sound (the clicking noise or w/e). Right after that, it should hand back audio focus to you and you will need to resume your playing.
http://developer.android.com/training/managing-audio/audio-focus.html

Android MediaPlayer stops on backpressed

I'm developing a radio stream app.I use android - mediaplayer class which plays radiostream. I m trying to run app in two devices . When I pressed back button in Samsung galaxy S3 mini(4.2.2) radio stream continues to playing. And I controls media player with notification bar. But when I pressed back button in Samsung galaxy S3(4.3) mediaplayer stopping to play. Why is stopping media player? How can I prevent stop when pressed back?
I don't use service but still I have not understood why s3 kills activity. But I found a solution . I change my super.onBackPressed() to moveTaskToBack(true);. And I added this option to manifest file in activity tag(Main) android:noHistory="true". Anymore when I pressed back key MediaPlayer isn't stopping stream. Maybe this solution may be useful to someone else. And I thanks for all of you for the answers.
Without some code i doubt anyone will be able to help.
How are you playing the radio stream? Are you using a service? If not the back button on S3 could be killing your app thus terminating the stream.

Categories

Resources