@OnNeverAskAgain called along with @NeedsPermission if we ask permission in onViewCreated() of Fragment
Author: satwinder07Created Sep 15, 2022Updated Sep 15, 2022
Overview
When we are asking for permission on Fragment launch inside onViewCreated() method. Both @OnNeverAskAgain and @NeedsPermission are getting called immediately. and if we are asking permission on some button click then it is working fine.
Expected
- It should not call
@OnNeverAskAgainwithout any action along with@NeedsPermission
Actual
- On fragment launch, both
@OnNeverAskAgainand@NeedsPermissionare getting called immediately.
Environment
Which library version are you using? Current Version
implementation 'com.github.permissions-dispatcher:permissionsdispatcher:4.9.2' kapt 'com.github.permissions-dispatcher:permissionsdispatcher-processor:4.9.2'On which devices do you observe the issue? One Plus 7 Android 11 , Samsung M30 and other
Source: permissions-dispatcher/PermissionsDispatcher