Android 13 can let developers disable app previews shown in the multitasking menu

Android 13 can let developers disable app previews shown in the multitasking menu

On Android, developers can prevent apps from being screenshotted by setting FLAG_SECURE. This has the intended side effect of also preventing app previews from being shown in the multitasking menu, as those previews are essentially screenshots of the app in their last used state. Banking apps and DRM-protected apps such as Netflix will typically make use of this protected flag, but it’s the only way to prevent that preview from being shown. Now it seems Android 13 will let developers disable those image previews only, while still allowing screenshots to be taken by the user.

As spotted by Esper, Android 13 introduces the setRecentsScreenshotEnabled API. There are a few reasons why a developer may wish to employ this feature. The most important of which I can imagine is when handling sensitive data that it trusts the user to decide if it’s safe to screenshot it or not. Currently, FLAG_SECURE is typically used to protect apps displaying copywritten content from having their contents captured, and it has the side effect of not allowing for app previews to be shown in the multitasking menu.

XDA VIDEO OF THE DAY

Let’s say you need to send a screenshot of a bank transfer to someone. The developer of your banking app has a choice to either set FLAG_SECURE, or to make use of the new setRecentsScreenshotEnabled API to disable screenshots of the app showing in the multitasking preview. If you want to send a screenshot of that transfer, you can’t do it while FLAG_SECURE is enabled. However, users may not want their bank’s sensitive details to be shown in the multi-tasking menu — sensitive details such as their bank balance or recent transfers. The introduction of this API solves exactly that problem.

It’s certainly a solution to a niche problem, but I’m sure there are other situations that are similar in circumstance. Developers using FLAG_SECURE to hide app previews in the recents menu was definitely a workaround that wasn’t really intended for that use, and it’s good to see Google giving developers a choice in how they hide those app previews.


Source: Esper

About author

Adam Conway
Adam Conway

I'm the senior technical editor at XDA-Developers. I have a BSc in Computer Science from University College Dublin, and I'm a lover of smartphones, cybersecurity, and Counter-Strike. You can contact me at [email protected] My Twitter is @AdamConwayIE and my Instagram is adamc.99.

We are reader supported. External links may earn us a commission.