system.setLocationThreshold()

类型 函数
system.*
返回值
修订 版本 2024.3703
关键词 GPS,位置
另请参阅 位置 (GPS)
system.setLocationAccuracy()

概述

设置移动多少米距离后才会发送下一个位置 (GPS) 事件。由于位置事件会使用可能耗尽电池电量的硬件,因此使用较大的阈值距离可以节省电池寿命。

语法

system.setLocationThreshold( distance )
距离 (必填)

数字 位置事件距离(以米为单位)。默认为 0 米。

示例

-- fire the location event every 100 meters
system.setLocationThreshold( 100 )