public class RealTimeLocationManager
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
void |
addListener(Conversation.ConversationType type,
java.lang.String targetId,
RealTimeLocationObserver observer)
添加位置共享观察者。
|
static RealTimeLocationManager |
getInstance() |
RealTimeLocationConstant.RealTimeLocationStatus |
getRealTimeLocationCurrentState(Conversation.ConversationType type,
java.lang.String targetId)
获取当前 RealTimeLocationStatus 对象的状态。
|
java.util.List<java.lang.String> |
getRealTimeLocationParticipants(Conversation.ConversationType type,
java.lang.String targetId)
获取参与该位置共享的所有成员。
|
void |
init(android.content.Context context,
RongIMClient.OnReceiveMessageListener listener,
IHandler stub) |
int |
joinRealTimeLocation(Conversation.ConversationType type,
java.lang.String targetId)
加入别人发起的位置共享。
|
void |
onRealTimeLocationQuit(Conversation.ConversationType type,
java.lang.String targetId) |
void |
quitRealTimeLocation(Conversation.ConversationType type,
java.lang.String targetId)
退出位置共享。
|
void |
removeListener(Conversation.ConversationType type,
java.lang.String targetId)
移除位置共享观察者。
|
int |
setupRealTimeLocation(Conversation.ConversationType conversationType,
java.lang.String targetId)
实例化 RealTimeLocation,每进行一次位置共享业务,就要初始化一个实例,直至位置共享结束,实例销毁。
|
int |
startRealTimeLocation(Conversation.ConversationType type,
java.lang.String targetId)
发起位置共享。
|
void |
updateLocation(Conversation.ConversationType type,
java.lang.String targetId,
double latitude,
double longitude)
已过时。
|
void |
updateLocation(Conversation.ConversationType type,
java.lang.String targetId,
double latitude,
double longitude,
RealTimeLocationType realTimeLocationType)
更新位置
|
public void init(android.content.Context context, RongIMClient.OnReceiveMessageListener listener, IHandler stub)
public static RealTimeLocationManager getInstance()
public void onRealTimeLocationQuit(Conversation.ConversationType type, java.lang.String targetId)
public int setupRealTimeLocation(Conversation.ConversationType conversationType, java.lang.String targetId)
conversationType
- 发起位置共享的所在会话的会话类型。targetId
- 发起位置共享的 target id。public int startRealTimeLocation(Conversation.ConversationType type, java.lang.String targetId)
type
- 发起位置共享的所在会话的会话类型。targetId
- 发起位置共享的 target id。RealTimeLocationConstant.RealTimeLocationErrorCode
。public int joinRealTimeLocation(Conversation.ConversationType type, java.lang.String targetId)
type
- 发起位置共享的所在会话的会话类型。targetId
- 发起位置共享的 target id。RealTimeLocationConstant.RealTimeLocationErrorCode
。public void quitRealTimeLocation(Conversation.ConversationType type, java.lang.String targetId)
type
- 发起位置共享的所在会话的会话类型。targetId
- 发起位置共享的 target id。public java.util.List<java.lang.String> getRealTimeLocationParticipants(Conversation.ConversationType type, java.lang.String targetId)
type
- 发起位置共享的所在会话的会话类型。targetId
- 发起位置共享的 target id。public RealTimeLocationConstant.RealTimeLocationStatus getRealTimeLocationCurrentState(Conversation.ConversationType type, java.lang.String targetId)
type
- 发起位置共享的所在会话的会话类型。targetId
- 发起位置共享的 target id。public void addListener(Conversation.ConversationType type, java.lang.String targetId, RealTimeLocationObserver observer)
type
- 发起位置共享的所在会话的会话类型。targetId
- 发起位置共享的 target id。observer
- RealTimeLocationListenerpublic void removeListener(Conversation.ConversationType type, java.lang.String targetId)
type
- 发起位置共享的所在会话的会话类型。targetId
- 发起位置共享的 target id。@Deprecated public void updateLocation(Conversation.ConversationType type, java.lang.String targetId, double latitude, double longitude)
type
- 发起位置共享的所在会话的会话类型。targetId
- 发起位置共享的 target id。latitude
- 位置共享纬度longitude
- 位置共享经度public void updateLocation(Conversation.ConversationType type, java.lang.String targetId, double latitude, double longitude, RealTimeLocationType realTimeLocationType)
type
- 会话类型targetId
- 目标 idlatitude
- 纬度longitude
- 经度realTimeLocationType
- 实时共享类型RealTimeLocationType}