Class RongConfigurationManager

  • All Implemented Interfaces:

    
    public class RongConfigurationManager
    
                        

    Configuration manager for locale and file size settings.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static RongConfigurationManager getInstance()
      static void init(Context context)
      void setFileMaxSize(Context context, int size) Sets the maximum file size for sending files.
      int getFileMaxSize(Context context) Gets the maximum file size for sending files.
      void switchLocale(RCLocale locale, Context context) Switches the app language.
      Context getConfigurationContext(Context newBase) Creates a ConfigurationContext for use in attachBaseContext.
      RCLocale getAppLocale(Context context) Gets the in-app locale setting.
      Locale getSystemLocale() Gets the system locale.
      RCLocale getLanguageLocal(Context context) Gets the current app language setting.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • init

         static void init(Context context)
      • setFileMaxSize

         void setFileMaxSize(Context context, int size)

        Sets the maximum file size for sending files.

        Parameters:
        context - context
        size - maximum file size in MB
      • getFileMaxSize

         int getFileMaxSize(Context context)

        Gets the maximum file size for sending files.

        Parameters:
        context - context
        Returns:

        maximum file size in MB

      • switchLocale

         void switchLocale(RCLocale locale, Context context)

        Switches the app language.

        Parameters:
        locale - accepted values: RCLocale.LOCALE_CHINA, RCLocale.LOCALE_US, or RCLocale.
      • getConfigurationContext

         Context getConfigurationContext(Context newBase)

        Creates a ConfigurationContext for use in attachBaseContext.

        Parameters:
        newBase - the base context
        Returns:

        the configuration-wrapped context

      • getAppLocale

         RCLocale getAppLocale(Context context)

        Gets the in-app locale setting.

        Returns:

        the in-app locale

      • getSystemLocale

         Locale getSystemLocale()

        Gets the system locale.

        Returns:

        the system locale

      • getLanguageLocal

         RCLocale getLanguageLocal(Context context)

        Gets the current app language setting.

        Returns:

        the resolved locale