I\'ve got an IntentService that I\'m trying to start. When I do, it spits out this:
java.lang.RuntimeException: Unable to start service com.pec.testapp.servi
If you're going to override onCreate()
in your IntentService
, then make sure you call super.onCreate()
in it. That seems to quite likely be your problem.
Not sure if it is the same problem, but I was using an intentService also, and I was having trouble using
context = getApplicationContext();
or context = getBaseContext(); I wasn't overriding onCreate so the previous solution may be the solution for you, I was working inside "onHandleIntent"
I would get an immediate exception with the first, and a exception later when I tried using the 2nd.
I ended up realizing that the Intentservice is itself a subclass of Context, so I substituted "this" wherever I needed an instance of "Context".
This solved my problem.