Home > other >  Android - IntentService can't start the reason?
Android - IntentService can't start the reason?

Time:11-25

I have a strange behavior of the Android IntentService. I by calling startService (intent) to send an intent to it.
(I'm sorry, I left the desk, cannot paste any actual code.)
When I dial the telephone?? No response. The Intent in the Service calls the constructor and onHandleIntent method. No compiler warnings or errors, I don't see any interest in the console or log.
When I continue to investigate this, I just want to know whether there is a short list of lists why IntentService wouldn't start like this and there is no obvious evidence. Problem may be out in the listing file?

CodePudding user response:

I doubt you need to take a closer look at LogCat. Here's common problems include:
Not listed in listing services & gt; Unable to create the public service on zero parameter constructor (IntentService default constructor accepts a parameter, you need to add your own constructor) & gt; Other grammar questions (for example, a service is declared abstract)
However, all of which will cause the message in LogCat. I don't think any case startService () under the condition of no message in LogCat won't call your code.

CodePudding user response:

I also didn't call, in the same way as the original poster said
  • Related