AndroidX DataStore 1.2.0

1.2.0
Added 7
  • Added the new datastore-guava module to expose Java and Guava ListenableFuture friendly APIs via GuavaDataStore
  • Added multiprocess support within GuavaDataStore
  • Added an overload for GuavaDataStore.from that accepts a Java Executor instead of a CoroutineContext and uses androidx.core.util.Function
  • Added support for using DataStore during Direct Boot mode
  • Added createInDeviceProtectedStorage() in DataStoreFactory to create a DataStore within Device Protected storage
  • Added deviceProtectedDataStore() in DataStoreDelegate to create a DataStore within Device Protected storage
  • Added PreferencesFileSerializer that implements androidx.datastore.core.Serializer for use with FileStorage
Changed 1
  • Defined the default constructor for ReplaceFileCorruptionHandler for common code usage
Fixed 3
  • Fixed java.lang.UnsatisfiedLinkError when using DataStore in an app optimized with R8 but not using the standard ProGuard file
  • Fixed an issue where GuavaDataStore operations could incorrectly run on the calling thread instead of the specified IO dispatcher
  • Resolved a FileNotFoundException in OkioStorage at startup by adding a second attempt to read data in case of a race condition

From AndroidX DataStore

Major changes since 1.1.0 release Java/Guava Support: Added the new datastore-guava module to expose APIs friendly to Java and Guava ListenableFuture users via GuavaDataStore. Added multiprocess support within GuavaDataStore. Added an overload for GuavaDataStore.from that accepts a Java Executor (instead of a CoroutineContext) and uses androidx.core.util.Function. Direct Boot Support: DataStore usage during Direct Boot mode is now supported. New APIs like createInDeviceProtectedStorage() in DataStoreFactory and deviceProtectedDataStore() in DataStoreDelegate allows creating the DataStore within the Device Protected storage. Storage and API Changes: Added PreferencesFileSerializer that implements androidx.datastore.core.Serializer for use with FileStorage. Defined the default constructor for ReplaceFileCorruptionHandler for common code usage. Bug Fixes: Fixed java.lang.UnsatisfiedLinkError when using DataStore in an app optimized with R8 but not using the standard ProGuard file. Fixed an issue where GuavaDataStore operations could incorrectly run on the calling thread (e.g., the main thread) instead of the specified IO dispatcher. Resolved a FileNotFoundException issue in OkioStorage at startup by adding a second attempt to read data in case of a race condition.

View original

Upgraded? How did it go?

Discussion