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)
}