Using FLAG_SECURE(more details) we can avoid recording screen but it still records audio.
How can we disable audio recording too?
Note
Audio is records after android 10 and system screen recorder.
Thanks in advance
This Package 'flutter_windowmanager: ^0.0.1+1'
you can prevent users from taking screenshots or recording videos of the app.
For more details, you can read this article for disable screen recording - https://mrgulshanyadav.medium.com/prevent-screenshot-and-video-recording-in-flutter-93839325d66c
You are right, your requirements is to disable audio recording.please read this article it may be help you,
https://android-developers.googleblog.com/2019/07/capturing-audio-in-android-q.html
but in IOS I already do it because there is a flag to check if the screen recording is runnning or not, so when it is running I set the volume to zero and it was useful trick.
Related
I have a media recorder, and i want to take screen capture without mic audio, only with the system sound.
Is there some solution to disable my mic and to capture system sounds?
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.NEED_SYSTEM_AUDIO_RESOURCE_HERE);
Unfortunately not. By Design mediarecorder took as audiosource only the predefined ones as per instruction.
I have a VideoView without any audio playing every time I start my app. I have noticed that when it starts playing, music playing from other apps in the background pauses. Is there any solution to this? Thank you!
Playing video while background music playing is not recommended:
To ensure a great user experience, it’s also important that your app manages the audio focus to ensure multiple apps aren’t playing audio at the same time.
You can check this for more information.
When you start play video using VideoView, you app request the audio focus, this mean the background app which is playing music lose the audio focus. The background app's behavior depends on the code in AudioManager.OnAudioFocusChangeListener.OnAudioFocusChangeListener method. You can not change it.
More information, see Managing Audio Focus.
I want to save as an image which is on android mobile screen at 10 sec time interval. Which may be home screen or menu screen or any thing. Can anybody tell me how i can achieve this?
I got success for my own application but its not capturing menu screen as an image.
Unfortunately, on most devices it's not possible to get the snapshot of the device outside your application. This, obviously, for security reasons.
This could be achieved accessing the frame buffer at /dev/graphics/fb0, but normally you don't have the permissions to read that.
You need to have a root access to achieve this. Write a background service and execute "/system/bin/screencap" to get the screenshot. Check this answer to find out how to get screenshot and store in sdcard.
Alternatively you can use Android Screenshot library to get screenshots on a non-rooted phones but it requires your phone to be connected to your desktop using ADB.
I am developing a musical piano app for android, in this app i want to record sound which user play by clicking piano buttons. I am using soundpool to play piano sounds. now for recording android gave us two api's MediaRecorder and AudioRecorder. but for both we have to set MediaRecorder.AudioSource. i didn't want to record sounds from mic because user sound can be included and more important sound quality decrease in recording. then i try to read bytes of that resource file which is played on clicking piano app. and when user click again and again then bytes will be together in global byte array. but when i play global byte array then this play only one resource file and one time only.
More important thing is i am new to android development. kindly guide me.
Although i did not find answer of my question, but now i am using technique for recording aspects which i want to share with all of you. Above function which i try to use is totally wrong option when you are trying to save music created by your app at run time. now for my first version i just saving the clicks of piano buttons along with system time in an array. now when i play that clicks it will play same sound as user try to record. i save these notes in database for further reuse by users.although this is not solution because these notes will be played in our app only, but this is good feature which we can add in our app. when i solve the correct solution, i will share with you guys
I was wondering what the best way to do this is. What I'm hoping to do is have a user push a button and automatically take a 10 second video, then save it to the SD card. I've seen how to do it through creating a new Intent, but the user then has to do the extra step of pushing record after selecting that they want to go to video. My goal is for them to push one button--one in my app that says "record", have it start recording for 10 seconds, then stop and save. In addition, I'd like to have some code executing in the background without being interrupted during said recording. What is the best way to do this?
Opening the camera with an Intent is simply opening the system camera app to take a picture/video. For more advanced usage, you can control the camera directly. Full details are in Controlling the Camera (from Android Developers).
You should make a service for that.