question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Listener not called when selecting Allow

See original GitHub issue

Description

My main goal is to auto open the gallery after the user clicks allow in case the permissions are not allowed.

The usage sample in README.md doesn’t achieve this, because after I click allow, the dialog dismisses but the gallery doesn’t open unless I click on the button again.

I tried to solve the problem using listener and based on this Issue #27 But it didn’t work.

KPermissions version: 3.1.2

API level: 29

Sample code:

val kPermission = permissionsBuilder(
           Manifest.permission.WRITE_EXTERNAL_STORAGE,
           Manifest.permission.READ_EXTERNAL_STORAGE
       ).build()

       kPermission.addListener {
           if (it.allGranted()) getContent.launch("image/*")
       }

       binding.editButtton.setOnClickListener {
           kPermission.send()
       }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AlaaZarifacommented, Nov 17, 2020

@fondesa it’s a very interesting bug indeed.! 3.1.3 works with no issues now 👍

0reactions
fondesacommented, Nov 16, 2020

Released the version 3.1.3 which fixes the bug. Feel free to re-open this issue if the bug is still happening.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot add event listener to select options in case you select ...
And it's a single select list, but I need to be able to re-focus to the info field even if I reselected the...
Read more >
Event listeners not working? 3 key areas to troubleshoot
Are your event listeners not working as you'd expect? Here are 3 key areas to troubleshoot to help you get everything triggering as...
Read more >
Listener registerd in addlistener is not called when selected in ...
The notification listener was only called while the app was running but not when the notification was selected while the app was not...
Read more >
12 Configuring and Administering the Listener
Enter the global database name, location of the Oracle home directory, and the SID of the instance in the appropriate fields. Choose File...
Read more >
Listeners for your Application Load Balancers
When the load balancer first routes a request to a weighted target group, it generates a cookie named AWSALBTG that encodes information about...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found