Skip to content
This repository has been archived by the owner on Sep 3, 2023. It is now read-only.

Result callback not getting triggered #21

Open
theapache64 opened this issue May 30, 2021 · 1 comment
Open

Result callback not getting triggered #21

theapache64 opened this issue May 30, 2021 · 1 comment
Labels
bug Something that needs to be fixed.

Comments

@theapache64
Copy link

theapache64 commented May 30, 2021

Timber.d("onCreate: Asking for permission")
askForPermissions(
    Permission.READ_EXTERNAL_STORAGE,
    Permission.READ_CONTACTS
) {
    Timber.d("onCreate: Result is $it") // THIS IS NOT GETTING TRIGGERED
}

Library Version:

implementation 'com.afollestad.assent:core:3.0.0-RC4'

Affected Device(s):

  • OnePlus6

Describe the Bug:

A clear description of what is the bug is.

To Reproduce:

  1. Create a new android project
  2. Simply askForPermissions with READ_EXTERNAL_STORAGE and READ_CONTACTS

Expected Behavior:

  • Result callback should be triggered

Actual Behavior

  • Result callback not getting triggered
@theapache64 theapache64 added the bug Something that needs to be fixed. label May 30, 2021
@Dzmitry-Lakisau
Copy link

I get the same situation in my app with following set of permissions: CALL_PHONE, GET_ACCOUNTS, READ_CALL_LOG, READ_CONTACTS, READ_PHONE_STATE. Reason is in that Android's onRequestPermissionsResult returns permissions in different order and equalsStrings fails.
Strange, but if I replace set of permissions by above one in sample project it works fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that needs to be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants