The interface for clients to access Block Store.
|int||MAX_SIZE||Maximum allowed size of byte blobs that can be
Public Method Summary
public static final int MAX_SIZE
Maximum allowed size of byte blobs that can be stored using
public abstract Task<Boolean> isEndToEndEncryptionAvailable ()
asynchronously determines whether Block Store data backed up to the cloud will be
End-to-end encryption is available for Pie and above devices with a lockscreen PIN/pattern.
Boolean return value is whether Block Store data backed up to the
cloud will be end-to-end encrypted.
public abstract Task<byte> retrieveBytes ()
byte may have been written on the same device or may have been
transferred during the device setup.
Use this API to seamlessly sign-in users to the apps on a new device.
If no data is found, returns an empty byte array. Note that the data may be cleared by Google Play services on certain user actions, like user clearing app storage (among others).
public abstract Task<Integer> storeBytes (StoreBytesData storeBytesData)
asynchronously stores the provided
The data is stored locally. It is transferred to a new device during the device-to-device restore if a google account is also transferred.
StoreBytesData.shouldBackupToCloud() is set to
true, the data
will also be backed up to the cloud in the next periodic sync. Cloud backup data is
transferred to a new device during the cloud restore using Google's Backup & Restore
The maximum size of the
byte bytes allowed is
MAX_SIZE; otherwise, the API will throw an
Integer return value is the size of
Use this API to store small data blobs that can enable seamless sign in for your apps. The API may be called periodically (for example, a few times per day) to refresh the data blob. Successive calls to this API will overwrite the existing bytes.