Skip to content

Repository files navigation

AsyncQuery

Build StatusDownload

Improved AsyncQueryHandler that handles BulkInsert operation

Note: This is literally a copy paste of the AsyncQueryHandler in Android and then modified that to support Bulk Insert operation. All credits goes to the Android Open Source team for writing the original AsyncQueryHandler.

Download

repositories {
jcenter() // or mavenCentral()
}
dependencies {
compile 'com.github.madrapps:asyncquery:1.0.1'
}

Usage

You would use this the same way as you would use AsyncQueryHandler except you can now use startBulkInsert()

finalDatabaseHandlerhandler = newDatabaseHandler(getContentResolver());
finalUriuri = newUri.Builder().scheme(SCHEME).authority(AUTHORITY).appendEncodedPath(ORGANIZATION).build();
handler.startBulkInsert(1, null, uri, getContentValues());
publicclassDatabaseHandlerextendsAsyncQueryHandler {
publicDatabaseHandler(ContentResolvercr) {
super(cr);
}
@OverrideprotectedvoidonBulkInsertComplete(inttoken, Objectcookie, intresult) {
super.onBulkInsertComplete(token, cookie, result);
Log.d("DatabaseHandler", "Bulk Insert Done");
}
}

License

AsyncQuery by Madrapps is licensed under a Apache License 2.0 by Android Open Source Platform.

About

Improved AsyncQueryHandler that handles BulkInsert operation

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages