Skip to content

Instantly share code, notes, and snippets.

@nhoxbypass
Last active February 17, 2020 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nhoxbypass/97472f3af7447a74fd3d4816e0730815 to your computer and use it in GitHub Desktop.
Save nhoxbypass/97472f3af7447a74fd3d4816e0730815 to your computer and use it in GitHub Desktop.
class MyPresenter(val view: MyView, val buildProvider: BuildVersionProvider) : BasePresenter() {
override fun onCameraButtonClick() {
if (buildProvider.isMarshmallowAndAbove()) {
view.requestCameraPermission()
} else {
navigator.openCamera()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment