Closed TurhanOz closed 7 years ago
Can you tell me some example case?
Let's say you're igniting a permission request during the onStart() of your activity
new TedPermission(context) .setPermissionListener(listener) .setDeniedMessage("whatever") .setPermissions(Manifest.permission.READ_CONTACTS) .check();
The listener
will be triggered as soon as the permission is granted/denied even though your activity goes onStop(). In my case, the listener
should process operations only when activity is visible, and I have no way to unregister the listener (unless registering an empty one when going to onStop ? which is still a workaround)
Any suggestion on that ? Cheers
@TurhanOz Why do you use Tedpermission
in onStart()
? (not onCreate()
)
I recommend onCreate()
.
Is there any "proper" mecanism offered by the API to unregister the listener (usefull when dealing with lifecycle). Cheers