Device
device
提供了一些 ROM
或者设备相关的工具方法
依赖引入
implementation("cn.qhplus.emo:device")
RomInfo
审核特色:读取 Build.Model,Build.BRAND,Build.MANUFACTURER 等都会缓存一次,以规避合规审查的次数要求。
fun getRomType(): RomType
fun isXiaomi(): Boolean
fun isHuawei(): Boolean
fun isHonor(): Boolean
fun isOppo(): Boolean
fun isVivo(): Boolean
fun isMeizu(): Boolean
fun isSamsung(): Boolean
HardwareInfo
fun getTotalMemory(context: Context): Long
fun getDataStorageSize(): Long
fun hasExtraStorage(): Boolean
fun getExtraStorageSize(): Long
fun getCpuCoreCount(): Int
fun getBatteryCapacity(context: Context): Double
关注公众号,入群聊聊~