-
- All Implemented Interfaces:
-
com.glia.androidsdk.screensharing.ScreenSharingRequest
public class ScreenSharingRequestInternal implements ScreenSharingRequest
-
-
Method Summary
Modifier and Type Method Description voidaccept(@NonNull() ScreenSharing.Mode mode, @NonNull() Activity activity, int requestCode, @NonNull() Consumer<GliaException> onResult)Accepts screen sharing request. voidaccept(@NonNull() ScreenSharing.Mode mode, @NonNull() Fragment fragment, int requestCode, @NonNull() Consumer<GliaException> onResult)Accepts screen sharing request. voidaccept(@NonNull() ScreenSharing.Mode mode, @NonNull() Fragment fragment, int requestCode, @NonNull() Consumer<GliaException> onResult)Accepts screen sharing request. voiddecline()Decline screen sharing request. -
-
Method Detail
-
accept
void accept(@NonNull() ScreenSharing.Mode mode, @NonNull() Activity activity, int requestCode, @NonNull() Consumer<GliaException> onResult)
Accepts screen sharing request.
When called the Visitor is prompted to give screen sharing permissions.Screen sharing is started immediately after the permissions are given.
This method requires a current Activity and a unique request code that can be used to trigger a screen capture permissionprompt via Activity#startActivityForResult(Intent, int).The request code is unique integer, that it is not used foryour own activity results.
Make sure to call onActivityResult fromthe provided activity'sActivity#onActivityResult(int, int, Intent)to allow Glia SDK to consume screen capture permission prompt result.
Apps targeting Android SDK version Build.VERSION_CODES.Q or later should have foreground service.The service should be registered in Manifest and specify ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION as part of foregroundServiceType
- Parameters:
mode- Screen sharing mode.activity- Current activityrequestCode- Unique request codeonResult- Called with{@code null}on success or with GliaException if the processfails for any reason.
-
accept
void accept(@NonNull() ScreenSharing.Mode mode, @NonNull() Fragment fragment, int requestCode, @NonNull() Consumer<GliaException> onResult)
- Parameters:
mode- Screen sharing mode.fragment- Current fragment.requestCode- Unique request codeonResult- Called with{@code null}on success or with GliaException if the processfails for any reason.
-
accept
void accept(@NonNull() ScreenSharing.Mode mode, @NonNull() Fragment fragment, int requestCode, @NonNull() Consumer<GliaException> onResult)
Accepts screen sharing request.
Similar to accept but accepts androidx.fragment.app.Fragment instance instead of Activity.
- Parameters:
mode- Screen sharing mode.fragment- Current fragment.requestCode- Unique request codeonResult- Called with{@code null}on success or with GliaException if the processfails for any reason.
-
decline
void decline()
Decline screen sharing request.
-
-
-
-