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

      • 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: