-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Problem with stack rationale dialog #193
Comments
@mgolebiowski95 can you show your |
or run this code and change orientation a few times |
You can too add to library method checking android permission dialog is actually showing. In onCreate() bundle savedInstanceState key="android:hasCurrentPermissionsRequest" which contains this value. |
I found quite accidentally :-) |
@mgolebiowski95 huh that's a cool tip about Can you show the crash logs you're getting? Also is your Activity a descendant of |
I hadn't crash. This is my simple test https://github.com/mgolebiowski95/easypermissionstest. (master, another_idea) problem: stack rationale dialog
Maybe AppSetting Dialog better create based on DialogFragment. Then can check findFragmentByTag is exists. With android:hasCurrentPermissionsRequest may be problem. When go to background and return to app onCreate() isn't called (only onStart() and onResume() ) and can not update value hasCurrentPermissionsRequest. (there is no access to savedInstanceState bundle) |
@mgolebiowski95 thanks for the code, I can confirm that in your situation the dialog does stack. There are two action items here:
|
#195 will fix this issue |
This issue has been fixed and released in version |
I have a similar bug in version Looks like easypermission is keeping reference to the Fragment after rotation But I don't get why if I rotate only once, it doesn't crash. |
Basic Information
Device type: ________
OS version: ________
EasyPermissions version: 1.0.1
Describe the problem
What happened? What did you expect to happen?
When I executed code below code 0 in onStart() every time show new rationale dialog over previous dialog. If dialog is exist new dialog should'nt show. A good solution would be to add a method that checks whether or not a rationale dialog is shown code 1 and code 2
Code and logs
code 0:
EasyPermissions.requestPermissions(this,
"To function properly, App needs your permissions. Allow permissions for App",
RC_REQUIRED_PERM,
REQUESTED_PERMISSIONS_ON_START);
code 1:
code 2:
// TODO(you): show the code that produces the problem,
execute code 0 in onStart() ex. go to background and returning to application more than 1 time
The text was updated successfully, but these errors were encountered: