public final class Boostlingo extends Object
Constructor and Description |
---|
Boostlingo(android.content.Context context,
String authToken,
String region,
BLLogLevel logLevel)
Obtains an instance of the Boostlingo SDK.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes all the resources taken by the SDK.
|
io.reactivex.Single<CallDetails> |
getCallDetails(int callId)
Retrieves the call details from the Boostlingo API.
|
io.reactivex.Single<CallDictionaries> |
getCallDictionaries()
Retrieves the call dictionaries from the Boostlingo API.
|
BLCall |
getCurrentCall()
Gets current Boostlingo call.
|
io.reactivex.Single<Profile> |
getProfile()
Retrieves the profile data from the Boostlingo API, caches the results so API is not hit every time.
|
String |
getRegion()
Gets Boostlingo selected region.
|
static List<String> |
getRegions()
Gets Boostlingo region list.
|
static String |
getVersion()
Gets Boostlingo library version.
|
io.reactivex.Single<List<Language>> |
getVideoLanguages()
Retrieves an ordered list of languages enabled in the video (VRI) policy.
|
io.reactivex.Single<List<Language>> |
getVoiceLanguages()
Retrieves an ordered list of languages enabled in the voice (OPI) policy.
|
io.reactivex.Completable |
hangUp()
Used to hang up the current call in Boostlingo.
|
io.reactivex.Completable |
initialize()
Loads and caches all the data needed for the SDK work from the Boostlingo API.
|
io.reactivex.Single<BLVideoCall> |
makeVideoCall(CallRequest callRequest,
BLCallStateListener callStateListener,
BLVideoListener videoListener,
BLChatListener chatListener,
com.twilio.video.VideoView remoteVideoView,
com.twilio.video.VideoView localVideoView)
Used to make/place a Video Call in Boostlingo.
|
io.reactivex.Single<BLVoiceCall> |
makeVoiceCall(CallRequest callRequest,
BLCallStateListener callStateListener,
BLChatListener chatListener)
Used to make/place a Voice Call in Boostlingo.
|
io.reactivex.Single<ChatMessage> |
sendChatMessage(String text)
Sends the text specified as a chat message to interpreter.
|
void |
setBlChatListener(BLChatListener chatListener)
Sets the chat related listener.
|
void |
setCallStateListener(BLCallStateListener callStateListener)
Sets the call state related listener.
|
void |
setVideoListener(BLVideoListener videoListener)
Sets the video call related listener.
|
io.reactivex.Completable |
validateCallReq(CallRequest callRequest)
Validates the call request is appropriate to start a call.
|
public Boostlingo(@NonNull android.content.Context context, @NonNull String authToken, @NonNull String region, BLLogLevel logLevel)
context
- Android application context.authToken
- Boostlingo auth token retrieved from the server.region
- Boostlingo region from _getRegions()_ list.logLevel
- Logging level.public String getRegion()
public static String getVersion()
public io.reactivex.Completable initialize()
public void setCallStateListener(@Nullable BLCallStateListener callStateListener)
callStateListener
- public void setVideoListener(@Nullable BLVideoListener videoListener)
videoListener
- public void setBlChatListener(@Nullable BLChatListener chatListener)
chatListener
- public BLCall getCurrentCall()
public io.reactivex.Single<CallDictionaries> getCallDictionaries()
public io.reactivex.Single<Profile> getProfile()
public io.reactivex.Single<List<Language>> getVoiceLanguages()
public io.reactivex.Single<List<Language>> getVideoLanguages()
public io.reactivex.Single<CallDetails> getCallDetails(int callId)
callId
- Call id.public io.reactivex.Single<BLVideoCall> makeVideoCall(@NonNull CallRequest callRequest, @NonNull BLCallStateListener callStateListener, @NonNull BLVideoListener videoListener, @Nullable BLChatListener chatListener, @NonNull com.twilio.video.VideoView remoteVideoView, com.twilio.video.VideoView localVideoView)
callRequest
- Call request model.callStateListener
- Call state listener.videoListener
- The listener to receive video related callbacks.chatListener
- The listener to receive chat related callbacks.remoteVideoView
- Remote video container.localVideoView
- Local video container.public io.reactivex.Single<BLVoiceCall> makeVoiceCall(@NonNull CallRequest callRequest, @NonNull BLCallStateListener callStateListener, @Nullable BLChatListener chatListener)
callRequest
- Call request model.callStateListener
- Call state listener.chatListener
- The listener to receive chat related callbacks.public io.reactivex.Completable hangUp()
public io.reactivex.Completable validateCallReq(@NonNull CallRequest callRequest)
callRequest
- Call request model.public io.reactivex.Single<ChatMessage> sendChatMessage(String text)
public void dispose()