Class ChatUIUtils

    • Constructor Detail

      • ChatUIUtils

        ChatUIUtils()
    • Method Detail

      • dip2px

         static int dip2px(float dipValue)
      • px2dip

         static int px2dip(float pxValue)
      • init

         static void init(Context context)
      • GetInfo

         static void GetInfo(Context context)
      • getDrawable

         static Drawable getDrawable(Context context, String resource)
      • getResizedBitmap

         static Bitmap getResizedBitmap(Context context, Uri uri, int widthLimit, int heightLimit)
      • getVideoDuration

         static int getVideoDuration(Context context, String videoPath)

        Gets the duration of a video file in milliseconds

      • md5

         static String md5(Object object)

        MD5 hash

      • getAppName

        @Deprecated() static String getAppName(Context context)

        Gets the application name

      • isDestroy

         static boolean isDestroy(Activity activity)
      • isLocationServiceEnabled

         static boolean isLocationServiceEnabled(Context context)

        Checks whether location services are enabled. The check method varies across different Android versions.

      • phoneIsInUse

         static boolean phoneIsInUse(Context context)

        Checks whether a phone call is currently in progress

      • saveKeyboardHeight

         static void saveKeyboardHeight(Context context, int orientation, int height)
      • checkSDKVersionAndTargetIsUDC

         static boolean checkSDKVersionAndTargetIsUDC(Context context)

        Note: this check must be called before checkSDKVersionAndTargetIsTIRAMISU.

        Parameters:
        context - context
        Returns:

        true if both the system version and targetSdkVersion are >= 34