概述

鹰眼为开发者免费存储最近1年的轨迹数据。鹰眼采用多机房多实例分布式存储,并定期自动备份,保障数据存储安全。
#import <BaiduTraceSDK/BaiduTraceSDK.h>
// 开启服务之间先配置轨迹服务的基础信息
BTKServiceOption *basicInfoOption = [[BTKServiceOption alloc] initWithAK:@"您的AK" mcode:@"您的bundle id" serviceID:@"您的serviceID" keepAlive:YES];
[[BTKAction sharedInstance] initInfo:basicInfoOption];
// 开启服务
BTKStartServiceOption *startServiceOption = [[BTKStartServiceOption alloc] initWithEntityName:@"entityName"];
[[BTKAction sharedInstance] startService:startServiceOption delegate:self];
// 停止服务
[[BTKAction sharedInstance] stopService:self];
//开始采集
[[BTKAction sharedInstance] startGather:self];
//结束采集
[[BTKAction sharedInstance] stopGather:self];
/**
开启轨迹服务的回调方法
@param error 开启轨迹服务的结果
*/
-(void)onStartService:(BTKServiceErrorCode) error {
}
/**
停止轨迹服务的回调方法
@param error 停止轨迹服务的结果
*/
-(void)onStopService:(BTKServiceErrorCode) error {
}
/**
开始采集的回调方法
@param error 开始采集的操作结果
*/
-(void)onStartGather:(BTKGatherErrorCode) error {
}
/**
停止采集的回调方法
@param error 停止采集的操作结果
*/
-(void)onStopGather:(BTKGatherErrorCode) error {
}

修改于 2022-08-08 04:27:07