com.github.madrapps:asyncquery

Improved AsyncQueryHandler that handles BulkInsert operation Edit

License

License

GroupId

GroupId

com.github.madrapps
ArtifactId

ArtifactId

asyncquery
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

aar
Description

Description

com.github.madrapps:asyncquery
Improved AsyncQueryHandler that handles BulkInsert operation Edit
Project URL

Project URL

https://github.com/Madrapps/AsyncQuery
Source Code Management

Source Code Management

https://github.com/Madrapps/AsyncQuery

Download asyncquery

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.madrapps/asyncquery/ -->
<dependency>
    <groupId>com.github.madrapps</groupId>
    <artifactId>asyncquery</artifactId>
    <version>1.0.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.madrapps/asyncquery/
implementation 'com.github.madrapps:asyncquery:1.0.0'
// https://jarcasting.com/artifacts/com.github.madrapps/asyncquery/
implementation ("com.github.madrapps:asyncquery:1.0.0")
'com.github.madrapps:asyncquery:aar:1.0.0'
<dependency org="com.github.madrapps" name="asyncquery" rev="1.0.0">
  <artifact name="asyncquery" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.github.madrapps', module='asyncquery', version='1.0.0')
)
libraryDependencies += "com.github.madrapps" % "asyncquery" % "1.0.0"
[com.github.madrapps/asyncquery "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
com.android.support » appcompat-v7 jar 25.3.1

Project Modules

There are no modules declared in this project.

AsyncQuery

Build Status Download

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()

final DatabaseHandler handler = new DatabaseHandler(getContentResolver());
final Uri uri = new Uri.Builder().scheme(SCHEME).authority(AUTHORITY).appendEncodedPath(ORGANIZATION).build();
handler.startBulkInsert(1, null, uri, getContentValues());
public class DatabaseHandler extends AsyncQueryHandler {

    public DatabaseHandler(ContentResolver cr) {
        super(cr);
    }

    @Override
    protected void onBulkInsertComplete(int token, Object cookie, int result) {
        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.

com.github.madrapps

Madrapps

Versions

Version
1.0.0