语言

LocationManager.FromContext(Context) 方法

定义

从上下文中获取位置管理器。

public static Android.Locations.LocationManager? FromContext(Android.Content.Context context);
static member FromContext : Android.Content.Context -> Android.Locations.LocationManager

参数

context
Context

用于获取位置服务的上下文。

返回

位置管理器,或者 null 服务不是位置管理器。

注解

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

适用于