powermanagers
1.0.0
Asus, Oppo, Sony 등의 일부와 같이 전화에 설치된 전원 관리자를 확인하는 Android 라이브러리 ...
프로젝트 빌드에 다음을 추가하십시오. 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)
}