Skip to content
プロジェクト

概要

A library to check hidden MIUI autostart permission.

開発ツール

この数値の測り方

計測したスター増加

24時間
0
7日間
-1
15日間
0
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

MIUI Autostart

Android kotlin

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

関連プロジェクトを探す

読み込み中…