Creating an IntentService
suggest changeTo create an IntentService, create a class which extends IntentService, and within it, a method which overrides onHandleIntent:
package com.example.myapp;
public class MyIntentService extends IntentService {
public MyIntentService() {
super("MyIntentService");
}
@Override
protected void onHandleIntent(Intent workIntent) {
// Do something in the background, based on the contents of workIntent.
}
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents