Note that there are some explanatory texts on larger screens.

plurals
  1. POSQLiteTransactionListener onCommit and onRollback never called
    primarykey
    data
    text
    <p>I am trying to use the SQLiteTransactionListener to know when a batch transaction has committed so I can send an notifyChange event to observers in a ContentProvider.</p> <p>The code starts a transaction for the bulk operation, and has nested transactions for each insert or update.</p> <p>I receive the onBegin message for each startTransaction of the bulk operation, however I never receive the onCommit or onRollback</p> <p>I have logged out the begin and end transaction calls to confirm that the nested calls are completing for each transaction, and as can be seen below, these are always matching.</p> <pre><code>Finish batch operation: success = true End batch transaction Begin batch transaction Bulk transaction: onBegin Inserting values into "Messages"table insert values transaction begin insert values transaction success notifyChange not sent due to currently processing batch operation insert values transaction end Inserting values into "Content"table insert values transaction begin insert values transaction success notifyChange not sent due to currently processing batch operation insert values transaction end Update values transaction begin Update values transaction success notifyChange not sent due to currently processing batch operation Update values transaction end Finish batch operation: success = true End batch transaction Download begining for content ID 12 </code></pre> <p>I have also looked at the code for SQLiteDatabase <a href="http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/database/sqlite/SQLiteDatabase.java" rel="nofollow">here</a>, but could see no reason this function would not be called. I have tried to find some examples of this online (here and in google search) but only find API documentation. </p> <p>Has anyone had some success using this class? Or can someone please tell me why I would not be getting this event?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload