I have an IntentService within an Activity, and when I try to call the service, it throws this error, which I find strange because if I have the empty constructor declared.<
public class UploadService extends IntentService {
Your Service
is an inner class. If you want to keep it inside Activity
, change it to static:
public static class UploadService extends IntentService {
You may want to read about different types of nested classes. First link from google: http://docs.oracle.com/javase/tutorial/java/javaOO/nested.html