Class StageDetectionUtil



  • public class StageDetectionUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static boolean isDebug(Context context)
      Check, if the App that is hosting the SDK, is in development.
      static boolean isProduction(Context context)
      Check, if the App that is hosting the SDK, is in production.
      • Methods inherited from class java.lang.Object

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

      • isDebug

        public static boolean isDebug(Context context)
        Check, if the App that is hosting the SDK, is in development.

        This isn't an exact science. It will do its best to determine, if the SDK is in a development or production environment.
        There is always a chance that it will return wrong results on weird devices or highly customized development environments.

        Parameters:
        context - A valid context
        Returns:
        true if the app is in development, false if it's live
      • isProduction

        public static boolean isProduction(Context context)
        Check, if the App that is hosting the SDK, is in production.

        This isn't an exact science. It will do its best to determine, if the SDK lives in a production environment.
        But there is always a chance that it will return wrong results on weird devices or highly customized development environments.

        Parameters:
        context - A valid context
        Returns:
        true if the app is in production, false if it's in development