Class Spaces

  • public class Spaces
    extends java.lang.Object
    Entry point into the Mux Spaces SDK for Android app developers

    This 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.

    • 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
        options -
      • getInstance

        public static Spaces getInstance​(android.content.Context context)
        Retrieve an instance of Spaces
        context -
      • getSDKVersion

        public static java.lang.String getSDKVersion()
        Get a string representing the version of the SDK in use
      • getSpace

        public static Space getSpace​(android.content.Context context,
                                     SpaceConfiguration configuration)
        Convenience for calling getSpace without having a Spaces instance lying around
        context -
        configuration -
      • setActivity

        public void setActivity​( activity)
        Set the current activity as seen by Spaces

        It is necessary to call this prior to attempting to publish a screen share track
        activity -
      • getActivity

        public 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.
        requestCode -
        resultCode -
        data -
      • setScreenShareNotification

        public void setScreenShareNotification​( 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!
        notification -
      • getNotification

        public getNotification()
        Retrieve the current Notification used to override the default notification.

        In the case it is null the default will be used.