Giter Site home page Giter Site logo

miui-autostart's Introduction

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 documentation

val enabled: Boolean = Autostart.getSafeState(context)
boolean enabled = Autostart.INSTANCE.getSafeState(context);

Or using isAutoStartEnabled(Context, DefaultValue)

Support

Paypal Stripe

I'm Kumaraswamy, also known as Xoma Dev. A self-taught developer with expertise in Kotlin and Java, I have a strong passion for learning new algorithms. Crafting Android projects is not just work for me, it's where I find my joy and creativity.

Your support means a lot to me.

Finding this solution was really tough. I had to work and research day after day until I finally figured it out. If you can help out with a small donation, it would mean a lot and add value to my work. Thanks a lot!

Kumaraswamy B.G

miui-autostart's People

Contributors

deepsourcebot avatar dhina17 avatar xomadev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

miui-autostart's Issues

Set minSdkVersion 21 to 19

I tried to use the librarby in my project. But it is not letting me use it.

so kindly set minSdkVersion 19

Not working

Hi we tested with Xiaomi device MIUI 12.5.6
In all conditions response is "autostart open"

Not working

I tested on a device with autostart permission turn-off and the method getAutoStartState() returned ENABLED.
Device: Redmi Note 9
MIUI version: 12.5.4
Android version: 11
MIUI Optimization: not depend on whether this parameter is enabled or disabled

Project compatibilities

This project works in all MIUI 10, 11, 12 releases? This project will be updated to works on MIUI 13?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.