Scenario:
I am sending user location (Object location with: lat, long and accuracy fields) to a web service from a Thread in a Service. If it fails because of various issues (like no network) I need to store it and try to send it next time. If it fails multiple times, multiple Location objects are stored.
I have 2 choices:
Use SQLite database and an SQLiteOpenHelper which on each thread is open, retrieve records from the table, close. On successfully sending it, clear the table content.
Use SharedPreferences while the location object is stored as an ArrayList (in case there are many) parsed to JSON with GSON. When needed parsed again to ArrayList.
I know that SharedPreferences has no size limit and depending on my conditions I could have like 100 rows (this is exaggerated but possible). My main concern is on SQlite having it open and closed so often, things might get messed up and end in force close. SharedPreferences would not interfere with anything but I am thinking I might get bad performance in saving/parsing such long lists. I know that SharedPreferences aren't made for this, but I want to hear opinions from you.