public class UbiboatManager extends java.lang.Object implements UniboatInterface
限定符和类型 | 方法和说明 |
---|---|
void |
destory()
销毁服务
|
void |
disableBackgroundUbiboat(boolean removeVar)
关闭泛舟前台服务
|
void |
enableBackgroundUbiboat(int id,
android.app.Notification notification)
使泛舟服务转为前台服务
如果有后台泛舟服务需求,在退到后台的时候,为了保证定位可以在后台一直运行, 可以调用该函数,
会将泛舟SDK的SERVICE设置成为前台服务,提高进程存活率
|
void |
enableUbiboatLog(boolean enable)
打开日志
|
void |
getAllPoi(int type)
获取所有
|
void |
getDis(java.lang.String id)
周期获取与指定id的距离
|
static UbiboatManager |
getInstance(android.content.Context ctx,
java.lang.String userId)
蓝牙定位服务获取方法,单例模式
|
void |
getNearPoi(double dis,
int type)
获取周围信息
|
void |
getScene()
获取场景
|
java.lang.String |
getSdkVersion()
获取sdk版本号
|
boolean |
isBind()
泛舟服务是否已绑定
|
void |
registerUbiboatListener(UbiboatListener ubiboatListener)
注册泛舟服务监听器
|
void |
setPeriod(long period)
数据更新间隔
|
void |
start()
开始服务
|
void |
stop()
停止服务
|
void |
unRegisterUbiboatListener(UbiboatListener ubiboatListener)
解绑监听器
|
void |
uploadAnchor(java.lang.String name,
java.lang.String url)
上传锚点
|
public static UbiboatManager getInstance(android.content.Context ctx, java.lang.String userId)
ctx
- userId
- public void registerUbiboatListener(UbiboatListener ubiboatListener)
ubiboatListener
- public void unRegisterUbiboatListener(UbiboatListener ubiboatListener)
ubiboatListener
- public void enableBackgroundUbiboat(int id, android.app.Notification notification)
id
- notification
- public void disableBackgroundUbiboat(boolean removeVar)
removeVar
- public boolean isBind()
public void start()
UniboatInterface
start
在接口中 UniboatInterface
public void stop()
UniboatInterface
stop
在接口中 UniboatInterface
public void getScene()
UniboatInterface
getScene
在接口中 UniboatInterface
public void getNearPoi(double dis, int type)
UniboatInterface
getNearPoi
在接口中 UniboatInterface
public void uploadAnchor(java.lang.String name, java.lang.String url)
UniboatInterface
uploadAnchor
在接口中 UniboatInterface
public void getDis(java.lang.String id)
UniboatInterface
getDis
在接口中 UniboatInterface
public void destory()
UniboatInterface
destory
在接口中 UniboatInterface
public void getAllPoi(int type)
UniboatInterface
getAllPoi
在接口中 UniboatInterface
public java.lang.String getSdkVersion()
public void enableUbiboatLog(boolean enable)
enable
- 日志开关,默认falsepublic void setPeriod(long period)
period
- 默认10s