posted 4 years ago
It is more common to use system services inside activities, services, broadcast receivers, content providers, and other Android components. If not, then a class wanting to access a system service will need to be provided application context somehow, as shown in this example code: