ParkSangGwon / TedPermission

Easy check permission library for Android Marshmallow
1.74k stars 238 forks source link

Rotational issue #7

Closed FlavioSantoro92 closed 7 years ago

FlavioSantoro92 commented 8 years ago

Hi. When the rotation is enabled and the dialog is showing, if I turn the device the method "onPermissionGranted" is called even if the user didn't make his decision.

ParkSangGwon commented 8 years ago

@Kito92 where did you check permission in your activity?

FlavioSantoro92 commented 8 years ago

@ParkSangGwon I call the check() method in the onResume() method of the fragment. I have to check the permission on the app's first opening. I put a log in the onPermissionGranted() method, and it's effectively called while screen is rotating! It works brilliantly, except for that issue.

gogui63 commented 8 years ago

I've this issue too.

ParkSangGwon commented 8 years ago

I recommand check permission in onCreate() why did you check permission in onResume()?

gogui63 commented 8 years ago

I didn't check in OnResume, I check in onCreate in my fragment

FlavioSantoro92 commented 8 years ago

Because I didn't see this part in the readme... Anyway if the user go to the setting to change the permissions and go back in the app the check won't be done because the onCreate isn't called unless the user kill the app and the fragment isn't create again! I guess this is the best way, and gogui63 already fix this!