Scoped Storage was the most controversial addition to Android 10 when it debuted last year, as it blocked most applications from accessing your phone's entire internal storage to improve privacy and security. Google ended up pushing the deadline for supporting Scoped Storage to the release of Android 11 later this year, but there's additional functionality in the new Android version for apps to try out.

Google has added a few features to the MediaStore API (which handles Scoped Storage operations) in Android 11, including a new createTrashRequest call that will 'trash' a file instead of deleting it immediately. The feature was shown off in a recent video on the Android Developers YouTube channel.

Just like the Trash Can/Recycle Bin on most desktop operating systems, trashed files are retained for a period of time — 30 days, in Android's case. This way, Android apps can provide the option to restore files that were previously trashed.

There isn't an easy way to check the contents of the trash folder, but if you give a file manager the 'All files access' permission from Android's special app access screen, a ".$Trash$" directory does show up on your phone's internal storage.

As XDA Developers noted in its coverage, this functionality isn't actually new to Beta 1. It first appeared in the initial Android 11 Developer Preview, and developer Yuriy Mysochenko created a demo app showing off the feature (as shown above).

  • Thanks:
  • Eduardo