HBiSoft / HBRecorder

Lightweight screen recording Android library
MIT License
407 stars 138 forks source link

Android 11 WRITE_EXTERNAL_STORAGE permission no longer works #79

Closed Charles0115 closed 3 years ago

Charles0115 commented 3 years ago

According to Google, If your app targets Android 11, both the WRITE_EXTERNAL_STORAGE permission and the WRITE_MEDIA_STORAGE privileged permission no longer provide any additional access.

This causes the app cannot start recording in Android 11.

HBiSoft commented 3 years ago

Where does this library use WRITE_EXTERNAL_STORAGE?

Charles0115 commented 3 years ago

checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE))

Charles0115 commented 3 years ago

The recording can be started when I remove the EXTERNAL_STORAGE permission, but this issue occurs. https://github.com/HBiSoft/HBRecorder/issues/78

HBiSoft commented 3 years ago

Ok, Manifest.permission.WRITE_EXTERNAL_STORAGE can be removed. I must have forgotten to remove it when updating the targetSdkVersion to 30. I will remove it in the next release.

As for the other issue, I will comment there.