- What would be the best way to cache the JASON strings locally and send them on their way when I get an internet connection.
You can put them to DB, but I would actually store them in local app file, path to this file can be stored in SharedPreferences.
How do I check if I have an Internet connection?
Use android.net.conn.CONNECTIVITY_CHANGE
broadcast: Broadcast receiver for checking internet connection in android app
inside this broadcast receiver, you can check Your DB or local file whether there is something to send to server.
Be aware that connectivity can be back even when your app was put to background, and this is when android might kill your app. Broadcast (if put in manifest) will resurect your app and allow to resend any json data.