how to take screen shot from any screen flutter? - android

I have a flutter application which have more than 10 screens and I need to take a screenshot of the opened screen when a specific event happened [event not by user so I don't know the opened screen] without .
I want a General solution because I tried Screen shot package
But I need to wrap every page with ScreenShot and save its controller but don't work because It's not expandable if I increase the pages and I some cases the event come from a thread and a can't know the opened page now

Related

How to programmatically take a screenshot on mobile(android) any where from service(background)?

Is it possible to programmatically take a screenshot of a mobile screen that is currently displaying? I want my app to take a screenshot of another screen after some time from a background service. what I have done already is I am getting the screenshot from the service but it is taking the screenshot of my app activity in which code is written but I want to take a screenshot every 5 mint no matter what screen is on appearing on the mobile from the background screen.
it is possible then help me out, please?
Maybe you can create only a receiver ACTION_TIME_TICK. If you declare it in AndroidManifest, this works when app closed also. However this works every minute and you have to control modulus 5 in onReceive and capture screenshot.

Android, preview of minimized app in task switcher [duplicate]

I'm wondering how to customize the Image for My App to Home Screen image when My app is in background mode, that is when user navigates between Apps in recent apps option where a small screen shot for all running apps is visible.
Eg: Image Attached for more clarity.
See the following questions:
Is there a way to change the thumbnail of an app in the android task
switcher (long press on home button)
How to force app to create
thumbnail (snapshot) for recent apps list?
How do I prevent
Android taking a screenshot when my app goes to the background?
So theoretically there are two potential solutions:
Override Activity.onCreateThumbnail() to customize the thumbnail.
Add FLAG_SECURE to the window to prevent thumbnails (and screenshots).
Activity.onCreateThumbnail() sounds awesome until you realize it's been broken since Android 4.0.3 when the method call was commented out. See above posts or be direct, see the Android source code:
// First create a thumbnail for the activity...
// For now, don't create the thumbnail here; we are
// doing that by doing a screen snapshot.
info.thumbnail = null; //createThumbnailBitmap(r);
Currently, there is no easy way to customize the thumbnail.
So that really only leaves FLAG_SECURE. This doesn't allow you to customize the thumbnail, but rather prevents it, e.g. password forms and sensitive information. There's a downside to using the flag- it will also prevent screenshots, screen capture, and mirrored displays.

I want to record android screen not full screen only a part of screen

I know we can record android screen, using mediaProjection and by using virtualdisplay. But i want to record a specific part of screen. i.e a fragment not entire activity. Please help me to solve this problem

Preventing Unity on Android Detecting User Input on Splash Screen?

When my Unity app starts up in Android on an older device I get a momentary black screen, then the splash screen and then another momentary black screen.
The problem is that the app is receiving user input during the second momentary black screen (before the user can actual see anything). I think Unity thinks that the initial Scene is displayed (but it hasn't been).
Is there a good way to prevent this initial input from registering?
You can try adding one more splash screen which can act as Loading screen and load the next level from it using
LoadLevelAsync
this way u will not have the issue of that black screen taking the input.

Customize Android App Screen Image which is visible in switch between Apps screen

I'm wondering how to customize the Image for My App to Home Screen image when My app is in background mode, that is when user navigates between Apps in recent apps option where a small screen shot for all running apps is visible.
Eg: Image Attached for more clarity.
See the following questions:
Is there a way to change the thumbnail of an app in the android task
switcher (long press on home button)
How to force app to create
thumbnail (snapshot) for recent apps list?
How do I prevent
Android taking a screenshot when my app goes to the background?
So theoretically there are two potential solutions:
Override Activity.onCreateThumbnail() to customize the thumbnail.
Add FLAG_SECURE to the window to prevent thumbnails (and screenshots).
Activity.onCreateThumbnail() sounds awesome until you realize it's been broken since Android 4.0.3 when the method call was commented out. See above posts or be direct, see the Android source code:
// First create a thumbnail for the activity...
// For now, don't create the thumbnail here; we are
// doing that by doing a screen snapshot.
info.thumbnail = null; //createThumbnailBitmap(r);
Currently, there is no easy way to customize the thumbnail.
So that really only leaves FLAG_SECURE. This doesn't allow you to customize the thumbnail, but rather prevents it, e.g. password forms and sensitive information. There's a downside to using the flag- it will also prevent screenshots, screen capture, and mirrored displays.

Categories

Resources