What is the difference between Context.startService(intent)
and startService(intent)
and does it matter which one is used?
There is only one startService()
method. startService()
is a method on the Context
class, available to all subclasses of Context
, like Activity
or Service
.
As Commonsware said there is only one startService()
. That is Context.startService(intent)
.
Your main activity program itself is an instance of Context
and you do not need to explicity call the method (startService) with a Context
.
It is like calling a method of a class within the class itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With