powermanagers
1.0.0
一个Android库,用于检查电话上已安装的电源管理人员,例如华硕,Oppo,Sony等...
将以下内容添加到您的项目build.gradle:
allprojects {
repositories {
.. .
maven { url ' https://jitpack.io ' }
}
}在您的应用/build.gradle中添加:
android {
.. .
dependencies {
implementation ' com.github.marcandreappel:powermanagers:1.0.0 '
}
}在任何(但最好是最早的)活动中, onCreate的活动:
// Check for the presence of a powermanager
val powermanagerIntent : Intent ? = Powermanagers .present( this )
// If there's one, then open it
if (powermanagerIntent != null ) {
startActivity(powermanagerIntent)
}