mifos-mobile icon indicating copy to clipboard operation
mifos-mobile copied to clipboard

BeneficiaryAddOptionsFragment - request permission problem

Open devansh-299 opened this issue 4 years ago • 2 comments

Summary:

  • The onRequestPermissionsResult method of BeneficiaryAddOptionsFragment is never called.
  • WRITE_EXTERNAL_STORAGE is not required API level 19 onwards and because of this the Manifest.permission.WRITE_EXTERNAL_STORAGE always returns '-1' i.e Permission denied on devices above API level 19. Link

Steps to reproduce:

  • Go to Beneficiaries
  • Tap on Add floating action button
  • Tap on Upload QR
  • Observe that permission for writing to the external storage was denied (if running on device with API < 19) and onRequestPermissionsResult was not called.

Expected behaviour:

  • For devices > API level 19, the WRITE_EXTERNAL_STORAGE permission is not needed to be asked because granting READ_EXTERNAL_STORAGE automatically grants the write permission whenever needed. Since the minimum API supported is 16, this has to be handled separately for devices < 19 and > 19 API level
  • The onRequestPermissionsResult method of BeneficiaryAddOptionsFragment should be called on requesting the permissions.

Device and Android version:

Xiaomi PocoF1 Android 10 Stock rom

devansh-299 avatar Apr 02 '20 07:04 devansh-299

Can i work on this issue?

rutvik-panchal avatar Apr 02 '20 08:04 rutvik-panchal

@rutvik-panchal I am already working on this issue

devansh-299 avatar Apr 02 '20 08:04 devansh-299