Preventing Unity on Android Detecting User Input on Splash Screen? - android

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.

Related

how to take screen shot from any screen flutter?

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

Can I reduce to 0 seconds the PreviewScreen(White) time at the start?

There's a white-blank screen in android, just before the launch screen, at the start of the Application, that white-blank screen it's about 2 seconds in devices like Samsung j1 with android 5.1. That 2 seconds it's due to the app performance or the Android and hardware performance, that 2 seconds can be reduced?.
We make up the problem using the following in our app theme: <item name="android:windowDisablePreview">true</item>, that means that the white screen now it's transparent, so it seems to be an Android problem from the user perspective, but it's a way to reduce the time of this preview screen to a half or near zero?
Reference to this problem in:
https://developer.android.com/topic/performance/vitals/launch-time
Android - Disable dummy starting window of application
https://stackoverflow.com/questions/40905317/how-can-i-remove-white-screen-which-appear-before-splash-screenhttps://stackoverflow.com/questions/37437037/android-prevent-white-screen-at-startup
https://www.tothenew.com/blog/disabling-the-preview-or-start-window-in-android/
blank screen comes before splash
Have a look at the startup guidelines and performance measurement techniques here:
https://developer.android.com/topic/performance/vitals/launch-time
This will tell you where the time is being spent during startup and give you suggestions on how to improve that.
Also, you can provide a splash screen that shows instead of the white screen. See details here:
https://android.jlelse.eu/the-complete-android-splash-screen-guide-c7db82bce565

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.

Android game: removing moving fingeracross the screen (swiping/flinging?)

I have an Android game app that populates the screen with tiny images (circles). The game is to tap the circles on the screen as quickly as possible until they all disappear. The problem is you can circumvent the game easily by swiping/moving one's finger across the screen (and making every circle touched disappear). In four swipes you're done with the game. I'm not even sure of the correct terminology.
Any ideas? onFling? onLongPress? I do not know.

Is there a way to find out that the All Apps screen is shown?

I'm creating a live wallpaper for Android and ran into an issue with the manual scrolling (without using the onOffsetsChanged method). The scrolling works like a charm except for one, but very unpleasent side-effect - when a user opens the "AllApps" screen and this screen is semi-transparent (like on the Xperia phones), the wallpaper keeps on reacting the touch events when the user goes through screens with his/her installed apps and scrolls.
I understand that nothing is changed from the wallpaper's "point of view" if this screen is semi-transparent. It keeps on rendering and continues to process all the touch events.
So, the question is - is there a way to track down the moment when a user opens the "AllApps" screen and stop processing touch events until this screen is closed? Any ideas?

Categories

Resources