From 414451a7c9e1743f1a74992332142a9e3a0859dc Mon Sep 17 00:00:00 2001 From: Jude Date: Sun, 27 Oct 2019 18:07:12 +0530 Subject: [PATCH] upgraded gradle and kotlin updated readme with the new helper function --- README.md | 11 +++++++++-- .../com/judemanutd/autostarterexample/MainActivity.kt | 2 -- autostarter/build.gradle | 10 +++++----- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index b6a8b0f..2cf20bc 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,13 @@ dependencies { Once you have integrated the library calling the following function will bring up the autostart permission manager of the phone. ```kotlin - AutoStartPermissionHelper.getInstance().getAutoStartPermission(context); + AutoStartPermissionHelper.getInstance().getAutoStartPermission(context) +``` + +In order to check if your phone is supported by the library you can call the following command. + +```kotlin + AutoStartPermissionHelper.getInstance().isAutoStartPermissionAvailable(context) ``` In order to keep the library small and simple I have not included any dialogs or pop ups, It is upto you to provide the user with a message if necessary. @@ -65,5 +71,6 @@ dependencies { 3. Honor [ Untested ] 4. Oppo [ Untested ] 5. Vivo [ Untested ] - + 6. Huawei [ Untested ] + I will be adding support for other manufacturers as and when possible. I am also open to PR's and contributions from others. diff --git a/app/src/main/java/com/judemanutd/autostarterexample/MainActivity.kt b/app/src/main/java/com/judemanutd/autostarterexample/MainActivity.kt index c67102c..cf8ff3e 100644 --- a/app/src/main/java/com/judemanutd/autostarterexample/MainActivity.kt +++ b/app/src/main/java/com/judemanutd/autostarterexample/MainActivity.kt @@ -3,7 +3,6 @@ package com.judemanutd.autostarterexample import android.os.Bundle import android.support.v7.app.AppCompatActivity import android.widget.Button - import com.judemanutd.autostarter.AutoStartPermissionHelper class MainActivity : AppCompatActivity() { @@ -15,6 +14,5 @@ class MainActivity : AppCompatActivity() { val button = findViewById