腾讯定位 SDK 地理围栏请求类,封装了鸿蒙系统的 GnssGeofenceRequest。

Author

Tencent Location Team

Since

1.0.2

Constructors

  • 构造地理围栏请求对象。

    Parameters

    • geofence: TencentGeofence

      地理围栏信息

    • monitorEvents: GeofenceEvent[]

      监听的地理围栏事件列表

    • eventsCallback: AsyncCallback<TencentGeofenceEvent>

      地理围栏事件回调函数

    • Optional notifications: NotificationRequest[]

      通知对象列表(可选)

    Returns TencentGeofenceRequest

    Since

    1.0.2

Properties

geofence: TencentGeofence

地理围栏信息,包含圆形围栏圆心坐标、半径等信息。

Since

1.0.2

monitorEvents: GeofenceEvent[]

监听的地理围栏事件列表,数组长度不超过 3。

Since

1.0.2

eventsCallback: AsyncCallback<TencentGeofenceEvent>

用于接收地理围栏事件的回调函数。

Since

1.0.2

notifications?: NotificationRequest[]

地理围栏事件发生后弹出的通知对象列表。
monitorEvents 与 notifications 中的顺序要一一对应,例如 monitorEvents[0] 为 ENTER,那 notifications[0] 中就需要填入用户进入围栏时需要弹出的通知对象。

Since

1.0.2

Methods

  • 将腾讯地理围栏请求转换为鸿蒙系统的 GnssGeofenceRequest。

    SDK 内部使用。

    Returns GnssGeofenceRequest

    鸿蒙系统的 GnssGeofenceRequest 对象

    Since

    1.0.2