Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 3
    now getSystemService() requires a Context and a serviceClass Class. For the context I can call requiredContext but what about for the serviceClass? Commented May 26, 2021 at 8:37
  • 1
    @capo11 I tried with Application.Context.getSystemService(), so I didn't need the serviceClass, but it doesn't work Commented Sep 8, 2021 at 10:37
  • 1
    Works well for me inside a Fragment using getActivity().getSystemService()... Commented Jun 29, 2022 at 14:36