百度鹰眼iOS SDK 类参考  3.1.3
构造函数 | 类方法 | 所有成员列表
BTKAction类 参考

轨迹服务与采集的操作类 更多...

#import <BTKAction.h>

类 BTKAction 继承关系图:

构造函数

(BOOL) - initInfo:
 
(void) - startService:delegate:
 
(void) - stopService:
 
(void) - startGather:
 
(void) - stopGather:
 
(void) - setLocationAttributeWithActivityType:desiredAccuracy:distanceFilter:
 
(void) - showsBackgroundLocationIndicator:
 
(void) - changeGatherAndPackIntervals:packInterval:delegate:
 
(void) - setCacheMaxSize:delegate:
 

类方法

(BTKAction *) + sharedInstance
 

详细描述

轨迹服务与采集的操作类

轨迹服务与采集的操作类 服务的启停和采集的启停都通过此类提供的方法来控制

在文件 BTKAction.h20 行定义.

函数文档

◆ changeGatherAndPackIntervals:packInterval:delegate:

- (void) changeGatherAndPackIntervals: (NSUInteger)  gatherInterval
packInterval: (NSUInteger)  packInterval
delegate: (id< BTKTraceDelegate >)  delegate 

设置采集周期和打包上传的周期 采集周期和上传周期的值域均为[2,300],且上传周期必须是采集周期的整数倍

参数
gatherInterval采集周期,单位:秒
packInterval打包上传周期,单位:秒
delegate操作结果的回调对象

◆ initInfo:

- (BOOL) initInfo: (BTKServiceOption *)  option

设置SDK运行所需的基础信息,调用任何方法之前都需要先调用此方法

参数
option服务信息
返回
TRUE代表设置成功,FALSE代表设置失败

◆ setCacheMaxSize:delegate:

- (void) setCacheMaxSize: (NSUInteger)  size
delegate: (id< BTKTraceDelegate >)  delegate 

设置SDK缓存所占磁盘空间的最大值。单位:MB。 如果设置了该阈值,当SDK缓存的数据占用磁盘超过该阈值时,将删除最早的缓存轨迹,直到满足该条件。 如果对于缓存占用空间没有非常强烈的要求,建议不要调用此方法。否则将会导致缓存轨迹数据被丢弃等情况,且数据无法找回。

参数
size缓存占用空间的最大值,最小值为50MB。

◆ setLocationAttributeWithActivityType:desiredAccuracy:distanceFilter:

- (void) setLocationAttributeWithActivityType: (CLActivityType)  activityType
desiredAccuracy: (CLLocationAccuracy)  desiredAccuracy
distanceFilter: (CLLocationDistance)  distanceFilter 

设置定位的选项

参数
activityType活动类型
desiredAccuracy期望的定位精度
distanceFilter触发定位的距离阀值

◆ sharedInstance

+ (BTKAction *) sharedInstance

◆ showsBackgroundLocationIndicator:

- (void) showsBackgroundLocationIndicator: (BOOL)  show

设置是否显示定位指示蓝条

参数
showYES:显示(进入后台时保留被授予的临时访问权限) NO:不显示

◆ startGather:

- (void) startGather: (id< BTKTraceDelegate >)  delegate

开始采集

参数
delegate操作结果的回调对象

◆ startService:delegate:

- (void) startService: (BTKStartServiceOption *)  option
delegate: (id< BTKTraceDelegate >)  delegate 

开启轨迹服务

参数
option开启服务需要的配置信息
delegate操作结果的回调对象

◆ stopGather:

- (void) stopGather: (id< BTKTraceDelegate >)  delegate

停止采集

参数
delegate操作结果的回调对象

◆ stopService:

- (void) stopService: (id< BTKTraceDelegate >)  delegate

停止轨迹服务

参数
delegate操作结果的回调对象

该类的文档由以下文件生成: