# RongUtils

public class RongUtils

## Constructors

RongUtils
Link copied to clipboard
public void RongUtils()

## Properties

density
Link copied to clipboard
public static float density
densityDpi
Link copied to clipboard
public static int densityDpi
dialogWidth
Link copied to clipboard
public static int dialogWidth
navbarheight
Link copied to clipboard
public static int navbarheight
scaleDensity
Link copied to clipboard
public static float scaleDensity
screenHeight
Link copied to clipboard
public static int screenHeight
screenMax
Link copied to clipboard
public static int screenMax
screenMin
Link copied to clipboard
public static int screenMin
screenWidth
Link copied to clipboard
public static int screenWidth
statusbarheight
Link copied to clipboard
public static int statusbarheight
xdpi
Link copied to clipboard
public static float xdpi
ydpi
Link copied to clipboard
public static float ydpi

## Functions

checkMicAvailable
Link copied to clipboard
public static boolean checkMicAvailable(Context context)
checkSDKVersionAndTargetIsTIRAMISU
Link copied to clipboard
public static boolean checkSDKVersionAndTargetIsTIRAMISU(Context context)
checkSDKVersionAndTargetIsUDC
Link copied to clipboard
public static boolean checkSDKVersionAndTargetIsUDC(Context context)
注意使用此判断要在 checkSDKVersionAndTargetIsTIRAMISU 判断之前
dip2px
Link copied to clipboard
public static int dip2px(float dipValue)
fixAndroid8ActivityCrash
Link copied to clipboard
public static void fixAndroid8ActivityCrash(Activity activity)
getAppName
Link copied to clipboard
@Deprecated()
public static String getAppName(Context context)
获取应用程序名称
getDialogWidth
Link copied to clipboard
public static int getDialogWidth()
getDrawable
Link copied to clipboard
public static Drawable getDrawable(Context context, String resource)
GetInfo
Link copied to clipboard
public static void GetInfo(Context context)
getNavBarHeight
Link copied to clipboard
public static int getNavBarHeight(Context context)
getResizedBitmap
Link copied to clipboard
public static Bitmap getResizedBitmap(Context context, Uri uri, int widthLimit, int heightLimit)
getSaveKeyBoardHeight
Link copied to clipboard
public static int getSaveKeyBoardHeight(Context context, int orientation)
getScreenHeight
Link copied to clipboard
public static int getScreenHeight()
getScreenWidth
Link copied to clipboard
public static int getScreenWidth()
getStatusBarHeight
Link copied to clipboard
public static int getStatusBarHeight(Context context)
getUriFromDrawableRes
Link copied to clipboard
public static Uri getUriFromDrawableRes(Context context, int id)
getVideoDuration
Link copied to clipboard
public static int getVideoDuration(Context context, String videoPath)
获取视频文件的时长(时间戳)
init
Link copied to clipboard
public static void init(Context context)
isDestroy
Link copied to clipboard
public static boolean isDestroy(Activity activity)
isLocationServiceEnabled
Link copied to clipboard
public static boolean isLocationServiceEnabled(Context context)
检查是否开启定位服务 检查定位服务是否开启的方法在不同的系统版本上不一样
md5
Link copied to clipboard
public static String md5(Object object)
md5加密
phoneIsInUse
Link copied to clipboard
public static boolean phoneIsInUse(Context context)
是否正在通话中
px2dip
Link copied to clipboard
public static int px2dip(float pxValue)
saveKeyboardHeight
Link copied to clipboard
public static void saveKeyboardHeight(Context context, int orientation, int height)