android - Are ActiveAndroid .save() operations executed on the main thread or asynchronously? -


im using activeandroid library , have read entire information (very minimalist , insufficient unfortunately) there no mention whether .save() operation executed syncrhonously.

if asynchronous, how "listen" end before proceeding?

http://www.activeandroid.com/ - documentation read

if have @ source code of model class, you'll see save method not thread handling:

public final long save() {     final sqlitedatabase db = cache.opendatabase();     final contentvalues values = new contentvalues();      (field field : mtableinfo.getfields()) {         /* ... */     }      if (mid == null) {         mid = db.insert(mtableinfo.gettablename(), null, values);     }     else {         db.update(mtableinfo.gettablename(), values, idname+"=" + mid, null);     }      cache.getcontext().getcontentresolver()             .notifychange(contentprovider.createuri(mtableinfo.gettype(), mid), null);     return mid; } 

saving occurs synchronously.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -