Best Practice Using OrmLiteBaseListActivity

What is the best practice for using OrmLiteBaseListActivity?

Is there a way to keep the view of the provided list synchronized with the database? Or should I really always have to do this myself, using the methods of adding or removing my array adapter (is it really needed when using this action?), When do I change the database?

And what notifications should be sent to update gui whenever the database changes? What about performance issues (a complete “query of all” for each change might not be a good idea)?

I could not find any information about this on the net ... and in the ORMLite docs I could not find the answer to my questions ... I would be grateful for the tips or links.

+3
source share
2 answers

I recently found this library

https://github.com/campnic/ormlite-android-extras

I have not tried it yet, but trying to solve the whole list adapter using the ORM problem.

Let us know how it went!

+2
source

I would recommend you use ContentObserver with ContentProvider to monitor database changes instead of a third-party ORM library. As far as I know, the ContentObserver class cannot be used with ORM.

0
source

All Articles