-
Notifications
You must be signed in to change notification settings - Fork 552
[BUG] Check and Request camera permission before taking photos. #2198
Conversation
| } | ||
|
|
||
| private fun getCameraPermission() { | ||
| requestPermissions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same way you did above, you could did here.
Use AndroidPermissionsHelper.requestPermission(...)
or, I'd move it to AndroidPermissionsHelper class in order to centralize all the permissions stuffs.
| } | ||
| } | ||
|
|
||
| private fun hasCameraPermission(context: Context): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move this function here to AndroidPermissionsHelper class in order to centralize all the permissions stuffs.
We could also move the canWriteToExternalStorage() and checkWritingPermission() from the ImageHelper class to AndroidPermissionsHelper - It can be done on other PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@filipedelimabrito I'll do both the things in this PR only.
|
@divyanshub024 Any news here? |
|
@filipedelimabrito I have made the requested changes. |
philipbrito
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for sending this PR @divyanshub024!
@RocketChat/android
Closes #2197