-
public abstract class MediaUpgradeOfferObject that represents media upgrade request that is send by the Operator to the Visitor.
Used as part of Media.Events.
Usage example:
int micPermissionCode = 101; int cameraPermissionCode = 102; ConsumeractionCallback = exception -> { if (exception != null) { // action not successful, something went wrong } else { // action was done successfully } }; Consumer
-
-
Field Summary
Fields Modifier and Type Field Description public final MediaDirectionaudiopublic final MediaDirectionvideo
-
Method Summary
Modifier and Type Method Description abstract voidaccept(Consumer<GliaException> callback)Accepts media upgrade offer.Audio and video communication is started immediately after the permissions are given. abstract voiddecline(Consumer<GliaException> callback)Declines the media upgrade offer. -
-
Method Detail
-
accept
abstract void accept(Consumer<GliaException> callback)
Accepts media upgrade offer.Audio and video communication is started immediately after the permissions are given.
This method requires a unique request codes that can be used to trigger a microphone and camera permissionprompt via Activity#requestPermissions(String[], int).See setRequestCode
Make sure to call onRequestPermissionsResult fromthe provided activity'sActivity#onRequestPermissionsResult(int, String[], int[])to allow Glia SDK to consume camera and microphone permission prompt result.
- Parameters:
callback- Called with{@code null}if done successfully or with GliaException if failed.
-
decline
abstract void decline(Consumer<GliaException> callback)
Declines the media upgrade offer.
- Parameters:
callback- Called with{@code null}if done successfully or with GliaException if failed.
-
-
-
-