public class RealTimeLocation extends StateMachine
StateMachine.LogRec
限定符和类型 | 字段和说明 |
---|---|
static int |
RC_REAL_TIME_LOCATION_EVENT_DISABLE_GPS |
static int |
RC_REAL_TIME_LOCATION_EVENT_JOIN |
static int |
RC_REAL_TIME_LOCATION_EVENT_JOIN_FAILURE |
static int |
RC_REAL_TIME_LOCATION_EVENT_NETWORK_UNAVAILABLE |
static int |
RC_REAL_TIME_LOCATION_EVENT_PARTICIPANT_JOIN |
static int |
RC_REAL_TIME_LOCATION_EVENT_PARTICIPANT_NO_RESPONSE |
static int |
RC_REAL_TIME_LOCATION_EVENT_PARTICIPANT_QUIT |
static int |
RC_REAL_TIME_LOCATION_EVENT_PARTICIPANT_START |
static int |
RC_REAL_TIME_LOCATION_EVENT_QUIT |
static int |
RC_REAL_TIME_LOCATION_EVENT_RECEIVE_LOCATION_MESSAGE |
static int |
RC_REAL_TIME_LOCATION_EVENT_REFRESH_TIME_EXPIRE |
static int |
RC_REAL_TIME_LOCATION_EVENT_SEND_LOCATION_MESSAGE |
static int |
RC_REAL_TIME_LOCATION_EVENT_START |
static int |
RC_REAL_TIME_LOCATION_EVENT_START_FAILURE |
static int |
RC_REAL_TIME_LOCATION_EVENT_TERMINAL |
HANDLED, NOT_HANDLED
构造器和说明 |
---|
RealTimeLocation(android.content.Context context,
Conversation.ConversationType type,
java.lang.String targetId,
RongIMClient.OnReceiveMessageListener listener)
Should initialize a RealTimeLocation if you start real time location service every time.
|
限定符和类型 | 方法和说明 |
---|---|
void |
addListener(RealTimeLocationObserver listener)
Add the real time location listener.
|
void |
deleteListener() |
java.util.List<java.lang.String> |
getParticipants()
Get all of the participants of the real time location.
|
RealTimeLocationConstant.RealTimeLocationStatus |
getRealTimeLocationCurrentState()
Get current state.
|
boolean |
gpsIsAvailable()
If GPS is available.
|
void |
updateLocation(double latitude,
double longitude) |
void |
updateLocationWithType(double latitude,
double longitude,
RealTimeLocationType realTimeLocationType) |
addLogRec, addState, addState, copyLogRecs, deferMessage, dump, getCurrentMessage, getCurrentState, getHandler, getLogRec, getLogRecCount, getLogRecSize, getLogRecString, getName, getWhatToString, haltedProcessMessage, isDbg, isQuit, log, logAndAddLogRec, logd, loge, loge, logi, logv, logw, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, onHalting, onQuitting, quit, quitNow, recordLogRec, removeMessages, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtFrontOfQueue, sendMessageAtFrontOfQueue, sendMessageAtFrontOfQueue, sendMessageAtFrontOfQueue, sendMessageAtFrontOfQueue, sendMessageDelayed, sendMessageDelayed, sendMessageDelayed, sendMessageDelayed, sendMessageDelayed, sendMessageDelayed, setDbg, setInitialState, setLogOnlyTransitions, setLogRecSize, start, transitionTo, transitionToHaltingState, unhandledMessage
public static final int RC_REAL_TIME_LOCATION_EVENT_START
public static final int RC_REAL_TIME_LOCATION_EVENT_JOIN
public static final int RC_REAL_TIME_LOCATION_EVENT_QUIT
public static final int RC_REAL_TIME_LOCATION_EVENT_PARTICIPANT_START
public static final int RC_REAL_TIME_LOCATION_EVENT_PARTICIPANT_JOIN
public static final int RC_REAL_TIME_LOCATION_EVENT_PARTICIPANT_QUIT
public static final int RC_REAL_TIME_LOCATION_EVENT_RECEIVE_LOCATION_MESSAGE
public static final int RC_REAL_TIME_LOCATION_EVENT_SEND_LOCATION_MESSAGE
public static final int RC_REAL_TIME_LOCATION_EVENT_START_FAILURE
public static final int RC_REAL_TIME_LOCATION_EVENT_JOIN_FAILURE
public static final int RC_REAL_TIME_LOCATION_EVENT_REFRESH_TIME_EXPIRE
public static final int RC_REAL_TIME_LOCATION_EVENT_TERMINAL
public static final int RC_REAL_TIME_LOCATION_EVENT_PARTICIPANT_NO_RESPONSE
public static final int RC_REAL_TIME_LOCATION_EVENT_NETWORK_UNAVAILABLE
public static final int RC_REAL_TIME_LOCATION_EVENT_DISABLE_GPS
public RealTimeLocation(android.content.Context context, Conversation.ConversationType type, java.lang.String targetId, RongIMClient.OnReceiveMessageListener listener)
context
- Context of App.type
- Conversation type of current conversation.targetId
- Target id of current conversation.public void addListener(RealTimeLocationObserver listener)
listener
- User's listener.public void deleteListener()
public void updateLocation(double latitude, double longitude)
public void updateLocationWithType(double latitude, double longitude, RealTimeLocationType realTimeLocationType)
public RealTimeLocationConstant.RealTimeLocationStatus getRealTimeLocationCurrentState()
public boolean gpsIsAvailable()
public java.util.List<java.lang.String> getParticipants()