AppUtils

class AppUtils

Author

Jenly Jenly

Functions

Link copied to clipboard
open fun apkExists(context: Context, versionCode: Long, file: File): Boolean
APK是否存在
Link copied to clipboard
字节转为十六进制字符串
Link copied to clipboard
open fun deleteFile(file: File): Boolean
删除文件或文件夹
Link copied to clipboard
open fun getApkCacheFilesDir(context: Context): String
获取APK缓存的文件夹
Link copied to clipboard
open fun getAppFullName(context: Context, url: String, defaultName: String): String
通过url获取App的全名称
Link copied to clipboard
open fun getAppIcon(context: Context): Int
获取App的图标
Link copied to clipboard
open fun getAppName(context: Context): String
获取App的名称
Link copied to clipboard
open fun getFileMD5(file: File): String
获取文件的MD5
Link copied to clipboard
获取文件访问授权
Link copied to clipboard
open fun getInstallIntent(context: Context, file: File, authority: String): Intent
获取安装Intent
Link copied to clipboard
open fun getPackageInfo(context: Context): PackageInfo
获取包信息
open fun getPackageInfo(context: Context, archiveFilePath: String): PackageInfo
通过APK路径获取包信息
Link copied to clipboard
open fun installApk(context: Context, file: File, authority: String)
安装APK
Link copied to clipboard
open fun isAndroidQFileExists(context: Context, file: File): Boolean
open fun isAndroidQFileExists(context: Context, path: String): Boolean
判断文件是否存在
Link copied to clipboard
open fun verifyFileMD5(file: File, md5: String): Boolean
校验文件的MD5