powermanagers
1.0.0
Uma biblioteca Android para verificar se há gerentes de energia instalados ao telefone, como alguns da Asus, Oppo, Sony, etc ...
Adicione o seguinte ao seu projeto Build.gradle:
allprojects {
repositories {
.. .
maven { url ' https://jitpack.io ' }
}
}e no seu aplicativo/build.gradle add:
android {
.. .
dependencies {
implementation ' com.github.marcandreappel:powermanagers:1.0.0 '
}
} Em qualquer atividade (mas de preferência a primeira), adicione o 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)
}