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:
So theoretically there are two potential solutions:
Activity.onCreateThumbnail()
to customize the thumbnail.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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With