语言

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。

特性

注解

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

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

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

适用于