Consider five clips in SD card. In ICS, the row id for these files starts 
from 12 (from 1 to 11 reserved for android default folder/files) in the 
database. The row id’s 12 to 16 are assigned for clip1 to clip5 
respectively. 

 *If a clip is deleted (say clip3 with id 14) in the SD card, the expected 
behavior is update of the database as below:*

Clip1 - 12

Clip2 - 13

Clip4 - 14

Clip5 - 15


* **If now a new clip is added in SD card, in database it should be 
inserted in Id = 16.*

 

*The observed behavior is the re-arrangement of the existing clips is not 
happening in the database:*

*Clip1 - 12*

*Clip2 - 13*

*Clip4 - 15*

*Clip5 - 16*

 

*The row id 14 in database is blocked and not being assigned to the next 
existing clip. *

Now, in this scenario if any new clip is added into SD card, this new clip 
is inserted and assigned into row id = 17. 

 

We observe that the MediaScanner provides proper row_id during deletion to 
Database via MediaProvider. *The object removed from the database is clip 
with proper row_id* but after deletion, re-arrangement is not observed for 
the remaining clips as described above.

In further debugging on the issue, found the same behavior in contacts 
database also (there is a jump in ids in contacts list database, if any 
contact is deleted and added a new one).

This issue seems to be in SQLite database from ICS while creating tables.

 Could you please provide inputs that would help us debugging this issue?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to