I have a column INTEGERin my database table and saved a value for it 1476355625598(by updating an existing row).
When I immediately check the value by running the query, I get the same, true, value 1476355625598.
However, when my IntentService later retrieves the value, it returns the value -1113124226.
I checked, and -1113124226this is the same value as you typed (int)1476355625598.
I have added debug output to all my lines of code that modify this column, and can confirm that I have no other database operations that update the value.
So, it seems like something is throwing my long one at int ... Any ideas how / why this could be happening?
NB. The value I save is the timestamp (millis format), which is preferable to save in string format.
UPDATE
Since my database is accessible through the content provider, I added a content observer to my MyApplication class. It does not report any other updates to this table.
UPDATE # 2
Now the problem is resolved. See Comment ...
source
share