pilgr / Paper

Paper is a fast NoSQL-like storage for Java/Kotlin objects on Android with automatic schema migration support.
Apache License 2.0
2.34k stars 234 forks source link

[sample app] AsyncTask or UI Thread Okay? #160

Closed js-commit closed 4 years ago

js-commit commented 5 years ago

According to the docs, read/write operations should happen in a non-UI thread like an AsyncTask.

However, the sample app show it's in the UI thread.

Can we get away with calling read/write in the UI Thread (for ex. an activity)?

pilgr commented 5 years ago

Yeah, thanks for pointing that out, it should be done differently. The app has never been referenced as sample app but some people may look into it so it's better be fixed.

pilgr commented 4 years ago

I've added async tasks to the sample app in PR #168 It was so fun to write it in 2020 😄