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: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.