Context.GetSystemServiceName(Class) 方法

定义

获取由指定类表示的系统级服务的名称。

[Android.Runtime.Register("getSystemServiceName", "(Ljava/lang/Class;)Ljava/lang/String;", "GetGetSystemServiceName_Ljava_lang_Class_Handler", ApiSince=23)]
public abstract string? GetSystemServiceName (Java.Lang.Class serviceClass);
[<Android.Runtime.Register("getSystemServiceName", "(Ljava/lang/Class;)Ljava/lang/String;", "GetGetSystemServiceName_Ljava_lang_Class_Handler", ApiSince=23)>]
abstract member GetSystemServiceName : Java.Lang.Class -> string

参数

serviceClass
Class

所需服务的类。

返回

如果类不是受支持的系统服务,则为服务名称或 null。

属性

注解

获取由指定类表示的系统级服务的名称。

android.content.Context.getSystemServiceName(java.lang.Class<?>)Java 文档。

此页面的某些部分是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的条款使用。

适用于