android-contentprovider
Insertion of thousands of contact entries using applyBatch is slow
Use ContentResolver.bulkInsert (Uri url, ContentValues[] values) instead of ApplyBatch() ApplyBatch (1) uses transactions and (2) it locks the ContentProvider once for the whole batch instead locking/unlocking once per operation. because of this, it is slightly faster than doing them one at a time (non-batched). However, since each Operation in the Batch can have a different … Read more
Content Provider INSTALL_FAILED_CONFLICTING_PROVIDER (installing content provider as a separate apk)
You can solve it by changing the value of android:authorities in your AndroidManifest.xml file. The reason for the error is that another application installed on your device already uses that same value for android:authorities.
How to query Android MediaStore Content Provider, avoiding orphaned images?
Okay, I’ve found the problem with this code sample. In the onCreate() method, I had this line: mImageCursor = managedQuery( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, projection, selection, selectionArgs, null ); The problem here is that it’s querying for the thumbnails, rather than the actual images. The camera app on HTC devices does not create thumbnails by default, and so … Read more