Closed HarveyLee1228 closed 5 years ago
If you're not using library you can avoid the problem?
If you're not using library you can avoid the problem?
Yes,I didn't get this problem before I changed my code to this library ,and I test another phone(Huawei),this library works fine .So this problem happens on Miui.
Can I get a correct code that works correctly? 🤔
Currently we have dedicated code for Xiaomi but other than that it's supposed to be ok.. 🤔
Can I get a correct code that works correctly?
Currently we have dedicated code for Xiaomi but other than that it's supposed to be ok..
PermissionsDispatcher/library/src/main/java/permissions/dispatcher/PermissionUtils.java
Line 94 in 1564313
private static boolean hasSelfPermission(Context context, String permission) {
Can I get a correct code that works correctly?
Currently we have dedicated code for Xiaomi but other than that it's supposed to be ok..
PermissionsDispatcher/library/src/main/java/permissions/dispatcher/PermissionUtils.java
Line 94 in 1564313
private static boolean hasSelfPermission(Context context, String permission) {
actually version 2.2.1 works correctly on Miui 10,I found this solution in the closed issue history. I suggest not to use the dedicated code for Miui.
You mean "Xiaomi".equalsIgnoreCase(Build.MANUFACTURER)
returns true in Miui device? 👀 Could you possibly test with PermissionUtils.java
? 🙇
@hotchemi : I guess it's normal that the "Xiaomi".equalsIgnoreCase(Build.MANUFACTURER)
returns true on the Miui device. Miui is developed by Xiaomi. So I guess @HarveyLee1228 is working on a Xiaomi phone. Right ?
@HarveyLee1228
when I do not use this library,my xiaomi phone can also show a permission dialog while i don't check permission in code,just in AndroidManifest.xml ,
so i think that because MIUI System has enclosured it, just as it enclosures Toast .
so does nothing when running on MIUI 10 is the answer? Then I'd like to close the issue because it's out of the scope haha 😅
I meet the same question,how to resolve that? use version 2.2.1?
@she246 @HarveyLee1228 @ludovicroland @Spikoss https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/533#issuecomment-438642578 what do you think?
Let us know your opinion https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/544
Miui 10 show the request dialog twice because : AppOpsManagerCompat.noteOp(context, permissionToOp, Process.myUid(), context.getPackageName()) I modified the source code
MIUI may have modified the Android source code
Oh thank you! so https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/544 would solve the problem may be?😅
Do you think https://github.com/permissions-dispatcher/PermissionsDispatcher/pull/548 would address the issue?
I suppose 4.1.0 solves the issue. Check it out. https://github.com/permissions-dispatcher/PermissionsDispatcher/releases/tag/4.1.0
When I request one permission,MIUI will show me the request dialog twice .When I clicked the nagative button ,it will show more than twice ,I dont know how to avoid it .I am using version 3.3.1