Class RongUtils

  • All Implemented Interfaces:

    
    public class RongUtils
    
                        
    • Constructor Detail

      • RongUtils

        RongUtils()
    • 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)

        获取视频文件的时长(时间戳)

      • md5

         static String md5(Object object)

        md5加密

      • getAppName

        @Deprecated() static String getAppName(Context context)

        获取应用程序名称

      • isDestroy

         static boolean isDestroy(Activity activity)
      • isLocationServiceEnabled

         static boolean isLocationServiceEnabled(Context context)

        检查是否开启定位服务

        检查定位服务是否开启的方法在不同的系统版本上不一样

      • phoneIsInUse

         static boolean phoneIsInUse(Context context)

        是否正在通话中

      • saveKeyboardHeight

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

         static boolean checkSDKVersionAndTargetIsUDC(Context context)

        注意使用此判断要在 checkSDKVersionAndTargetIsTIRAMISU 判断之前

        Parameters:
        context - 上下文
        Returns:

        系统版本和 targetVersion 都大于34