Upload queue for data
<p>For an android app i'm developing i need to check for an internet connection, before sending data to a web service. It's possible that a device won't be connected to the web for hours, while tasks have to be completed and put into a queue for uploading. Once the device establishes a connection, all of the data has to be transmitted. </p>

<p>I thought about using getSystemService(Context.CONNECTIVITY_SERVICE) however that's only possible in an Activity, and for a correct use of OOP, i want to get all of the upload code into a separate class which checks for internet connection, makes a JSON, etc. It also routinely needs to check for a connection to see if the data can be transmitted.</p>

<p>What would be the best way of accomplishing this? </p>
