XomaDev/MIUI-Autostart
关于
A library to check hidden MIUI autostart permission.
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文MIUI Autostart
A library to check MIUI autostart permission state.
Tested on
- MIUI 10 (firebase)
- MIUI 11 (physical device 11.0.9)
- MIUI 12 (physical device 12.5)
- MIUI 13 (untested, but works)
- MIUI 14 (physical device 14.0.2)
But not limited for newer releases
Setup
Gradle
Add the JitPack repository to your build file
repositories {
maven { url 'https://jitpack.io' }
}
Add the dependency
dependencies {
implementation 'com.github.XomaDev:MIUI-autostart:v1.3'
}
Maven
Add the JitPack repository to your build file
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add the dependency
<dependency>
<groupId>com.github.XomaDev</groupId>
<artifactId>MIUI-autostart</artifactId>
<version>v1.3</version>
</dependency>
Usage
It's recommended to use the Safe API; refer to the documentation
val enabled: Boolean = Autostart.getSafeState(context)
boolean enabled = Autostart.INSTANCE.getSafeState(context);
Or using isAutoStartEnabled(Context, DefaultValue)
Google Play policy
This library relies on hidden APIs in the MIUI framework to access the auto-start state. From Android 9 and later, access to hidden APIs is restricted. This library gets around that restriction.
Although I could not find an explicitly stated policy regarding the use of hidden APIs, based on reports, your application might not pass review unless you stop reporting library usage.
From LSPosed/AndroidHiddenApiBypass:
Google Play doesn't allow apps to use hidden APIs, reporting library usage will cause your app to fail app review, you need to disable dependencies info reporting in build.gradle. Remember to update this library to latest version to be compatible with new Android version.
android {
dependenciesInfo {
includeInApk = false
includeInBundle = false
}
}
探索相关项目
加载中…