Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.

Conversation

@divyanshub024
Copy link
Contributor

@RocketChat/android

Closes #2197

@philipbrito philipbrito added this to the 3.4.0 milestone Apr 5, 2019
}

private fun getCameraPermission() {
requestPermissions(
Copy link
Contributor

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 {
Copy link
Contributor

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.

Copy link
Contributor Author

@divyanshub024 divyanshub024 Apr 5, 2019

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 divyanshub024 changed the title [BUG] Check and Request camera permission before taking photos. [WIP] [BUG] Check and Request camera permission before taking photos. Apr 6, 2019
@philipbrito
Copy link
Contributor

@divyanshub024 Any news here?
Thank you.

@divyanshub024 divyanshub024 changed the title [WIP] [BUG] Check and Request camera permission before taking photos. [BUG] Check and Request camera permission before taking photos. Apr 16, 2019
@divyanshub024
Copy link
Contributor Author

@filipedelimabrito I have made the requested changes.

Copy link
Contributor

@philipbrito philipbrito left a 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!

@philipbrito philipbrito merged commit d01a94f into RocketChat:develop Apr 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] App is crashing while taking photos without permission

2 participants