Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors on xiaomi device #23

Closed
ItsKlork opened this issue Nov 30, 2019 · 12 comments
Closed

Errors on xiaomi device #23

ItsKlork opened this issue Nov 30, 2019 · 12 comments

Comments

@ItsKlork
Copy link

W/System.err: com.judemanutd.autostarter.AutoStartPermissionHelper.startIntent(AutoStartPermissionHelper.kt:268)

I get 5 more errors when doing AutoStartPermissionHelper.getInstance().getAutoStartPermission(getApplicationContext());

get this on a xiaomi device. help?

@judemanutd
Copy link
Owner

judemanutd commented Nov 30, 2019

Could you post the entire error log please. Which model are you trying this on?

@ItsKlork
Copy link
Author

ItsKlork commented Dec 7, 2019

im trying this on the xiaomi redmi note 7

@judemanutd
Copy link
Owner

@ItsKlork Just tried it out on the redmi note 7 and works fine. Could you post the error log along with the android version and miui version on the phone.

Have you run the example app from the repo, does that work?

@ItsKlork
Copy link
Author

ItsKlork commented Dec 7, 2019

2019-12-07 11:28:04.696 21706-21706/com.dev.mapup W/System.err: at com.judemanutd.autostarter.AutoStartPermissionHelper.startIntent(AutoStartPermissionHelper.kt:268)
2019-12-07 11:28:04.696 21706-21706/com.dev.mapup W/System.err: at com.judemanutd.autostarter.AutoStartPermissionHelper.autoStartXiaomi(AutoStartPermissionHelper.kt:122)
2019-12-07 11:28:04.697 21706-21706/com.dev.mapup W/System.err: at com.judemanutd.autostarter.AutoStartPermissionHelper.getAutoStartPermission(AutoStartPermissionHelper.kt:85)
2019-12-07 11:28:04.697 21706-21706/com.dev.mapup W/System.err: at com.judemanutd.autostarter.AutoStartPermissionHelper.startIntent(AutoStartPermissionHelper.kt:268)
2019-12-07 11:28:04.697 21706-21706/com.dev.mapup W/System.err: at com.judemanutd.autostarter.AutoStartPermissionHelper.autoStartXiaomi(AutoStartPermissionHelper.kt:122)
2019-12-07 11:28:04.697 21706-21706/com.dev.mapup W/System.err: at com.judemanutd.autostarter.AutoStartPermissionHelper.getAutoStartPermission(AutoStartPermissionHelper.kt:85)

@ItsKlork
Copy link
Author

ItsKlork commented Dec 7, 2019

nothing is happening

@judemanutd
Copy link
Owner

@ItsKlork Which miui version are you on?

@ItsKlork
Copy link
Author

ItsKlork commented Dec 7, 2019

MIUI Global 11.0.4

@judemanutd
Copy link
Owner

Got the same phone with the same version, works perfectly fine, no clue what's up.

@judemanutd
Copy link
Owner

If you could create a separate repo recreating this exact bug I could give this a try else looks like there's something local to your phone that's causing the issue

@ItsKlork
Copy link
Author

ItsKlork commented Dec 9, 2019

How should I use the AutoStarter in code (in onCreate)? Just to be sure

@judemanutd
Copy link
Owner

Yep that should work fine, it doesn't really depend on any activity lifecycle as such but any lifecycle events after onCreate should be more than safe to use the code in, instead of using the application context try using the activity context instead and see if that works

@judemanutd
Copy link
Owner

closing this issue as there is no further action to be taken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants