In my app I have an option for the user to completely reset the app (remove all data/preferences they have set) so what I did when they select reset is to do a delete all in the ContentProvider
for example
getActivity().getContentResolver().delete(CalEvents.CONTENT_URI, null, null);
Doing this I thought the database now being cleared would start the id counter back at 1 but that is clearly not the case
The problem is that one of my tables used the database id 1-16
to look for data but when that table gets delete the next insert for that database would be 17-33
and that causes problems because I am looking for numbers 1-16 so it will never display data.
So part 1 of my question is, is it possible to get the table to re-index after I do a mass delete from it? I am guessing no but I do not know the answer.
If that is not possible how can I put out an update to the app where I can add a column to the table without
deleting the data when it gets added? Currently I could increment the database version and the column would get added but it will delete all my data when the app updates and I do not want that