Android 13 can let builders disable app previews proven within the multitasking menu
On Android, builders can forestall apps from being screenshotted by setting FLAG_SECURE. This has the meant facet impact of additionally stopping app previews from being proven within the multitasking menu, as these previews are primarily screenshots of the app of their final used state. Banking apps and DRM-protected apps similar to Netflix will sometimes make use of this protected flag, but it surely’s the one option to forestall that preview from being proven. Now it appears Android 13 will let builders disable these picture previews solely, whereas nonetheless permitting screenshots to be taken by the person.
As noticed by Esper, Android 13 introduces the setRecentsScreenshotEnabled API. There are just a few explanation why a developer could want to make use of this function. Crucial of which I can think about is when dealing with delicate knowledge that it trusts the person to determine if it’s secure to screenshot it or not. At present, FLAG_SECURE is usually used to guard apps displaying copywritten content material from having their contents captured, and it has the facet impact of not permitting for app previews to be proven within the multitasking menu.
Let’s say it is advisable to ship a screenshot of a financial institution switch to somebody. The developer of your banking app has a option to both set FLAG_SECURE, or to utilize the brand new setRecentsScreenshotEnabled API to disable screenshots of the app exhibiting within the multitasking preview. If you wish to ship a screenshot of that switch, you may’t do it whereas FLAG_SECURE is enabled. Nevertheless, customers could not need their financial institution’s delicate particulars to be proven within the multi-tasking menu — delicate particulars similar to their financial institution steadiness or latest transfers. The introduction of this API solves precisely that downside.
It’s definitely an answer to a distinct segment downside, however I’m certain there are different conditions which can be related in circumstance. Builders utilizing FLAG_SECURE to cover app previews within the recents menu was undoubtedly a workaround that wasn’t actually meant for that use, and it’s good to see Google giving builders a selection in how they cover these app previews.
Supply: Esper