In Google Android Kotlin documentation, Every now and then there is a below line present in android documentation that: Instances of this class must be obtained using Context.getSystemService(Class)
For example:
Instances of this class must be obtained using Context.getSystemService(Class) with the argument AppOpsManager.class or Context.getSystemService(String) with the argument Context.APP_OPS_SERVICE.
Can someone please clarify what this is and how do I create a instance for class AppOpsManager.
Usually we can create instance like:
val use = AppOpsManager()
Please help and explain the above Context.getSystemService().
Thank You.