The Service is class on its own, the IntentService is defined as an inner class within Service
That's not going to work, unless perhaps the IntentService
is a static inner class.
The reason is to share global variables (without passing them).
There are no global variables in Java. The closest analogue are static data members, and you do not need to use an inner class to "share" those.
isnt there some problem with IntentService being inner class of Service?
Your manifest claims that all of your services are standalone public classes, not inner classes.
If you elect to have a BarIntentService
that is a static inner class of FooService
, the syntax would be android:name=".FooService$BarIntentService"
. A non-static inner class cannot be used for a Service
, as Android cannot create an instance of it.