Package com.mux.sdk.webrtc.spaces
Class Spaces
- java.lang.Object
-
- com.mux.sdk.webrtc.spaces.Spaces
-
public class Spaces extends java.lang.Object
Entry point into the Mux Spaces SDK for Android app developersThis exists as an application level singleton roughly equivalent to the facilities web developers would get from the browser. This simplifies things with respect to lifecycle management.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Spaces.SdkOptions
Options which affect the whole instance of the SDK and are not alterable on a per-Space basis.
-
Field Summary
-
Fields inherited from class com.mux.sdk.webrtc.spaces.BaseMuxRealTime
muxRealTimeInternals, RENDERER_FOR_CAMERA, RENDERER_FOR_SCREEN_SHARE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description android.app.Activity
getActivity()
static Spaces
getInstance(android.content.Context context)
Retrieve an instance of Spacesandroid.app.Notification
getNotification()
Retrieve the current Notification used to override the default notification.static Spaces.SdkOptions
getSdkOptions()
static java.lang.String
getSDKVersion()
Get a string representing the version of the SDK in usestatic Space
getSpace(android.content.Context context, SpaceConfiguration configuration)
Convenience for calling getSpace without having a Spaces instance lying aroundboolean
onActivityResult(int requestCode, int resultCode, android.content.Intent data)
Handle the result of another activity launch.void
setActivity(android.app.Activity activity)
Set the current activity as seen by Spaces
It is necessary to call this prior to attempting to publish a screen share trackvoid
setScreenShareNotification(android.app.Notification notification)
Override the default Notification that appears when screen sharing is occuring.static void
setSdkOptions(Spaces.SdkOptions options)
Sets the SdkOptions to use SdkOptions are global to all use of the SDK and are things which cannot be adjusted on a per-Space basis.-
Methods inherited from class com.mux.sdk.webrtc.spaces.BaseMuxRealTime
getDefaultCamera, getLocalVideoCamera, getSpace, isCameraFrontFacing
-
-
-
-
Method Detail
-
setSdkOptions
public static void setSdkOptions(@NotNull Spaces.SdkOptions options)
Sets the SdkOptions to use SdkOptions are global to all use of the SDK and are things which cannot be adjusted on a per-Space basis. If this method is not called reasonable defaults are assumed- Parameters:
options
-
-
getSdkOptions
public static Spaces.SdkOptions getSdkOptions()
-
getInstance
public static Spaces getInstance(android.content.Context context)
Retrieve an instance of Spaces- Parameters:
context
-- Returns:
-
getSDKVersion
public static java.lang.String getSDKVersion()
Get a string representing the version of the SDK in use- Returns:
-
getSpace
public static Space getSpace(android.content.Context context, SpaceConfiguration configuration)
Convenience for calling getSpace without having a Spaces instance lying around- Parameters:
context
-configuration
-- Returns:
-
setActivity
public void setActivity(android.app.Activity activity)
Set the current activity as seen by Spaces
It is necessary to call this prior to attempting to publish a screen share track- Parameters:
activity
-
-
getActivity
public android.app.Activity getActivity()
-
onActivityResult
public boolean onActivityResult(int requestCode, int resultCode, android.content.Intent data)
Handle the result of another activity launch.
During initialisation of screen sharing the system will use the Activity provided in setActivity to configure and launch the OS activity to request permission for screen sharing. The result of this request has to be passed back into the SDK here in order for the final setup to complete.- Parameters:
requestCode
-resultCode
-data
-- Returns:
-
setScreenShareNotification
public void setScreenShareNotification(android.app.Notification notification)
Override the default Notification that appears when screen sharing is occuring.
If you don't override this you will get a very basic notification!- Parameters:
notification
-
-
getNotification
public android.app.Notification getNotification()
Retrieve the current Notification used to override the default notification.
In the case it is null the default will be used.- Returns:
-
-