approach for synching android app database with server db?
<p>I'm developing an Android app as a "proof of concept" for our company. If they like it and think it's worth investing, then we'll move on to bigger things.  I'm trying to figure out the best/most practical approach for this.....the basics of the app will connect to our DB and display information regarding a specific customer.  For now, let's say we will only pull data from 3-4 tables (but there could be 10+ in the future).  If the app doesn't have an internet connection then it should use the local DB.  What is the best approach for this?  Here's what I was thinking and would like some input/suggestions if possible:</p>

<p>1.) app runs checks internet connection.  If exists, check db version (how, through a web service?)..if server db is newer, get latest data.  If no internet, use local db.
2.) app parses data and displays it.</p>

<p>If this is correct, then there could be no modifications to the web service that would add fields to a result without changing the app as well.  Is there a way for an app to parse fields regardless of how many fields there are?</p>

<p>I've read and walked through the tutorial on google with databases and such (Notepad tutorial) but it seems like the column names are all hard-coded in the parsing class, which I was hoping to avoid.</p>

<p>Sorry if this is confusing but I know I need my app to use a local db to read data, I also know that the app must get data from the server when it can (via onCreate or a refresh button) and copy it locally....Copying it locally is the part I'm having trouble understanding I guess....is there no way of saying "go out and get this result and display it", knowing that those results could mean 5 fields the first time or 1 the next.</p>

<p>Any help/guidance is greatly appreciated!</p>
