Class LeanCloud

java.lang.Object
cn.leancloud.core.LeanCloud

public class LeanCloud extends Object
we should set following variables: 0. app region(one of EastChina, NorthChina, NorthAmerica) 1. appid/appKey 2. log level 3. log adapter
  • Constructor Details

    • LeanCloud

      public LeanCloud()
  • Method Details

    • setRegion

      public static void setRegion(LeanCloud.REGION region)
    • getRegion

      public static LeanCloud.REGION getRegion()
    • enablePrintAllHeaders4Debug

      public static void enablePrintAllHeaders4Debug(boolean flag)
    • setLogLevel

      public static void setLogLevel(LCLogger.Level level)
    • getLogLevel

      public static LCLogger.Level getLogLevel()
    • isDebugEnable

      public static boolean isDebugEnable()
    • setCircularReferenceDetectEnable

      public static void setCircularReferenceDetectEnable(boolean enable)
    • isEnableCircularReferenceDetect

      public static boolean isEnableCircularReferenceDetect()
    • initialize

      public static void initialize(String appId, String appKey)
    • initialize

      public static void initialize(String appId, String appKey, String serverUrl)
    • getServerDateInBackground

      public static io.reactivex.Observable<LCDate> getServerDateInBackground()
      get current datetime from server.
      Returns:
      observable instance.
    • setMasterKey

      public static void setMasterKey(String masterKey)
      set master key.
      Parameters:
      masterKey - master key.
    • setServer

      public static void setServer(LeanService service, String host)
      set server info.
      Parameters:
      service - service type.
      host - host string.
    • clearServerURLs

      public static void clearServerURLs()
    • setServerURLs

      protected static void setServerURLs(String host)
    • setLastModifyEnabled

      @Deprecated public static void setLastModifyEnabled(boolean val)
      Deprecated.
    • isLastModifyEnabled

      @Deprecated public static boolean isLastModifyEnabled()
      Deprecated.
    • setNetworkTimeout

      @Deprecated public static void setNetworkTimeout(int seconds)
      Deprecated.
    • getNetworkTimeout

      @Deprecated public static int getNetworkTimeout()
      Deprecated.
    • setAutoMergeOperationDataWhenSave

      public static void setAutoMergeOperationDataWhenSave(boolean flag)
      Set default behavior for object save operation.
      Parameters:
      flag - flag to indicate whether enable auto merge operation data or not, default is false
    • getApplicationId

      public static String getApplicationId()
    • getSimplifiedAppId

      public static String getSimplifiedAppId()
    • getApplicationKey

      public static String getApplicationKey()
    • getHookKey

      public static String getHookKey()
    • setHookKey

      public static void setHookKey(String key)