Object RTCBridge
-
- All Implemented Interfaces:
public class RTCBridgeRTC bridge entry point.
Provides all im_libcore capabilities required by the RTC module. The RTC module accesses underlying IM core functionality through this class without directly depending on im_libcore.
This class is for internal RTC module use only. External developers should not call this directly. External calls will trigger Android Lint errors.
-
-
Method Summary
Modifier and Type Method Description final StringgetVoIPInfo()Gets VoIP information. final StringgetVersion()Gets the SDK version. final BooleanisPrivateSDK()Checks whether this is a private cloud SDK. final StringgetDeviceId()Gets the unique device identifier. final LonggetDeltaTime()Gets the time delta between the local clock and the server clock. final StringgetNavPreferenceValue(String key)Gets a navigation preference value. final Boolean)>getPrivateCloudConfig(<Error class: unknown class> context)Gets private cloud configuration. final UnitsendRtcSignaling(String roomId, String methodName, Boolean isQuery, ByteArray buffer, Integer timeoutSec, RTCCallback<ByteArray> callback)Sends an RTC signaling message. final UnitcancelRTCSignaling(IntArray requestIds)Cancels pending RTC signaling requests. final UnitforceReconnect(RTCCallback<String> callback)Forces a reconnection. final UnitsetRTCHeartbeatListener(RTCHeartbeatListener listener)Sets the RTC heartbeat listener. final UnitsendRTCHeartbeat(Array<String> roomIds, Integer timeout)Sends an RTC heartbeat. final UnitsetRTCRoomEventListener(RTCRoomEventListener listener)Sets the RTC room event listener. final UnitrequestNav(String appKey, String token, Boolean notify, String reason)Requests a navigation refresh. final UnitaddNavigationObserver(RTCNavigationObserver observer)Adds a navigation event observer. final UnitsolveServerHosts(String host, RTCCallback<List<String>> callback)Resolves server hostnames. final UnitwriteLog(Integer level, Integer type, String tag, String keys, Object values)Writes a log entry. final UnitsendGroupCallSignalInfo(String targetId, String key, String signalInfo, CallPlusSignalCallback callback)Sends group call signaling. final UnitsetGroupCallSignalListener(CallPlusSignalListener listener)Sets the group call signaling listener. final UnitregisterExtensionModule(RTCExtensionModule module)Registers an RTC extension module. -
-
Method Detail
-
getVoIPInfo
final String getVoIPInfo()
Gets VoIP information.
- Returns:
VoIP configuration as a JSON string.
-
getVersion
final String getVersion()
Gets the SDK version.
- Returns:
SDK version string.
-
isPrivateSDK
final Boolean isPrivateSDK()
Checks whether this is a private cloud SDK.
- Returns:
truefor private cloud,falsefor public cloud.
-
getDeviceId
final String getDeviceId()
Gets the unique device identifier.
- Returns:
device ID string.
-
getDeltaTime
final Long getDeltaTime()
Gets the time delta between the local clock and the server clock.
Use
System.currentTimeMillis() - getDeltaTime()to obtain the current server time.- Returns:
time delta in milliseconds.
-
getNavPreferenceValue
final String getNavPreferenceValue(String key)
Gets a navigation preference value.
- Parameters:
key- Preference key name- Returns:
preference value, or an empty string if not found.
-
getPrivateCloudConfig
final Boolean )>getPrivateCloudConfig(<Error class: unknown class> context)
Gets private cloud configuration.
- Parameters:
context- Application context- Returns:
trueif the environment is private cloud.
-
sendRtcSignaling
final Unit sendRtcSignaling(String roomId, String methodName, Boolean isQuery, ByteArray buffer, Integer timeoutSec, RTCCallback<ByteArray> callback)
Sends an RTC signaling message.
- Parameters:
roomId- Room IDmethodName- Method nameisQuery-truefor Query type,falsefor Publish typebuffer- Protobuf-encoded datatimeoutSec- Timeout in secondscallback- Asynchronous result callback
-
cancelRTCSignaling
final Unit cancelRTCSignaling(IntArray requestIds)
Cancels pending RTC signaling requests.
- Parameters:
requestIds- List of request IDs to cancel
-
forceReconnect
final Unit forceReconnect(RTCCallback<String> callback)
Forces a reconnection.
RTC-specific: forces the SDK to disconnect and reconnect.
- Parameters:
callback- Reconnection result callback
-
setRTCHeartbeatListener
final Unit setRTCHeartbeatListener(RTCHeartbeatListener listener)
Sets the RTC heartbeat listener.
- Parameters:
listener- Heartbeat event listener
-
sendRTCHeartbeat
final Unit sendRTCHeartbeat(Array<String> roomIds, Integer timeout)
Sends an RTC heartbeat.
- Parameters:
roomIds- List of room IDstimeout- Timeout in seconds
-
setRTCRoomEventListener
final Unit setRTCRoomEventListener(RTCRoomEventListener listener)
Sets the RTC room event listener.
- Parameters:
listener- Room event listener
-
requestNav
final Unit requestNav(String appKey, String token, Boolean notify, String reason)
Requests a navigation refresh.
Used by RTC to re-fetch the navigation JWT.
- Parameters:
appKey- Application keytoken- User tokennotify- Whether to send a notificationreason- Reason for the request
-
addNavigationObserver
final Unit addNavigationObserver(RTCNavigationObserver observer)
Adds a navigation event observer.
- Parameters:
observer- Navigation event observer
-
solveServerHosts
final Unit solveServerHosts(String host, RTCCallback<List<String>> callback)
Resolves server hostnames.
- Parameters:
host- Hostname to resolvecallback- Result callback returning a list of IP addresses
-
writeLog
final Unit writeLog(Integer level, Integer type, String tag, String keys, Object values)
Writes a log entry.
- Parameters:
level- Log leveltype- Log typetag- Log tagkeys- Key namesvalues- Key values
-
sendGroupCallSignalInfo
final Unit sendGroupCallSignalInfo(String targetId, String key, String signalInfo, CallPlusSignalCallback callback)
Sends group call signaling.
Pending IM implementation.
- Parameters:
targetId- Target IDkey- Signaling keysignalInfo- Signaling contentcallback- Asynchronous result callback
-
setGroupCallSignalListener
final Unit setGroupCallSignalListener(CallPlusSignalListener listener)
Sets the group call signaling listener.
Pending IM implementation.
- Parameters:
listener- Signaling receive listener
-
registerExtensionModule
final Unit registerExtensionModule(RTCExtensionModule module)
Registers an RTC extension module.
Extension modules registered through this method will receive SDK lifecycle callbacks and message routing.
- Parameters:
module- RTC extension module instance
-
-
-
-