Colton Idle01/30/2023, 12:22 AM
yschimke01/30/2023, 1:18 AM
Stylianos Gakis01/30/2023, 8:29 AM
as a String right? Could even do it with the proto Datastore I guess?
yschimke01/30/2023, 8:48 AM
* DataStore provides a safe and durable way to store small amounts of data, such as preferences * and application state. It does not support partial updates: if any field is modified, the whole * object will be serialized and persisted to disk. If you want partial updates, consider the Room * API (SQLite). * * DataStore provides ACID guarantees. It is thread-safe, and non-blocking. In particular, it * addresses these design shortcomings of the SharedPreferences API: * * 1. Synchronous API encourages StrictMode violations * 2. apply() and commit() have no mechanism of signalling errors * 3. apply() will block the UI thread on fsync() * 4. Not durable – it can returns state that is not yet persisted * 5. No consistency or transactional semantics * 6. Throws runtime exception on parsing errors * 7. Exposes mutable references to its internal state