I am using the WakefulIntentService
3rd party IntentService
implementation.
Basically I have a few planned tasks and I can only run them here:
protected void doWakefulWork(Intent intent) {
System.out.println("This is where I do the work for every 10 secs!");
}
However this only passes intent, what I want to do is able to use Context
for various reasons such as getSystemService
, openOrCreateDatabase
etc. which are available within a Context
. So how can I access context
from an intent? If this is not possible, how can I do tasks like connecting to a database?