powermanagers
1.0.0
Une bibliothèque Android pour vérifier les gestionnaires d'alimentation installés sur le téléphone, comme certains d'Asus, Oppo, Sony, etc ...
Ajoutez ce qui suit à votre projet build.gradle:
allprojects {
repositories {
.. .
maven { url ' https://jitpack.io ' }
}
}et dans votre application / build.gradle ajouter:
android {
.. .
dependencies {
implementation ' com.github.marcandreappel:powermanagers:1.0.0 '
}
} Dans toute activité (mais de préférence la plus ancienne), ajoutez sous 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)
}