Starting in Android 11 (API level 30), the system caches large datasets that multiple apps might access for use cases like machine learning and media playback. This functionality helps reduce data redundancy, both over the network and on disk.
When your app needs access to a shared large dataset, it can first look for
these cached datasets, called shared data blobs, before determining whether to
download a new copy. Apps can access these shared datasets functionality using
the APIs in BlobStoreManager.
The system maintains the shared data blobs and controls which apps can access them. When your app contributes data blobs, you can indicate which other apps should have access by calling one of the following methods:
- To grant access to a specific set of apps on a device, pass the package names
of these apps into
allowPackageAccess(). - To allow only apps whose certificates are signed using the same key as the one
used for your app—such as an app suite that you manage—call
allowSameSignatureAccess(). - To grant access to all apps on a device, call
allowPublicAccess().