public class TcrTestEnv
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static TcrTestEnv |
getInstance()
获取
TcrTestEnv 实例。 |
void |
startSession(Context ctx,
java.lang.String experienceCode,
java.lang.String clientSession,
<any> listener,
ErrorListener errorListener)
Request to start the session in the test environment and obtain the server session.
|
void |
startSession(Context ctx,
java.lang.String experienceCode,
java.lang.String clientSession,
java.lang.String userID,
java.lang.String hostUserID,
java.lang.String role,
boolean isTestEnv,
boolean isInternational,
<any> listener,
ErrorListener errorListener)
Request to start the session in the test environment and obtain the server session.
|
void |
stopSession(java.lang.String experienceCode)
Request to stop the session in the test environment.
|
public static TcrTestEnv getInstance()
TcrTestEnv
实例。public void startSession(Context ctx, java.lang.String experienceCode, java.lang.String clientSession, <any> listener, ErrorListener errorListener)
ctx
- Android's Context
experienceCode
- The experience code created in the console.clientSession
- The client session returned by the TcrSession.Event.STATE_INITED
event
after SDK initialization is successful.listener
- The listener for successful requests.
The parameter of the onResponse method after a successful request is the server session.errorListener
- The listener for failed requests.public void startSession(Context ctx, java.lang.String experienceCode, java.lang.String clientSession, java.lang.String userID, java.lang.String hostUserID, java.lang.String role, boolean isTestEnv, boolean isInternational, <any> listener, ErrorListener errorListener)
ctx
- Android's Context
experienceCode
- The experience code created in the console.clientSession
- The client session returned by the TcrSession.Event.STATE_INITED
event
after SDK initialization is successful.userID
- The user id you want to sethostUserID
- The room host user id. default nullrole
- is player or not. valid value: Player ViewerisInternational
- Is it a Tencent Cloud International Station experience codelistener
- The listener for successful requests.
The parameter of the onResponse method after a successful request is the server session.errorListener
- The listener for failed requests.public void stopSession(java.lang.String experienceCode)
experienceCode
- The experience code created in the console.