title: android database management Online use JSON(DB on some web), offline use(local DB) if both fail use (java local variable)
body: <p>I am new with android sqlite database. I have an idea to implement this method about the app that will choose within three option (online database(if the local database is not the same as the online ones then the app will upload the online values to the local database), local database(default values inside the app) and the java variables(in case the app fail to connect to both offline and online database).  A method that will check if connected or not 1st to online then offline else it will use java variables. Is there any example that is similar to this idea?</p>
  
  <p>thanks in advance,</p>