We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HomeActivity is currently responsible for requesting the necessary Android permissions, this is wrong.
HomeActivity
The idea is the HomeActivity should only be responsible for navigation.
/** * Runtime permission shenanigans */ private fun hasReadSmsPermission(): Boolean { return ContextCompat.checkSelfPermission(this, Manifest.permission.READ_SMS) == PackageManager.PERMISSION_GRANTED && ContextCompat.checkSelfPermission(this, Manifest.permission.RECEIVE_SMS) == PackageManager.PERMISSION_GRANTED && ContextCompat.checkSelfPermission(this, Manifest.permission.SEND_SMS) == PackageManager.PERMISSION_GRANTED } private fun requestReadAndSendSmsPermission() { ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.SEND_SMS, Manifest.permission.READ_SMS, Manifest.permission.RECEIVE_SMS), SMS_PERMISSION_CODE) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
HomeActivity
is currently responsible for requesting the necessary Android permissions, this is wrong.Context
The idea is the
HomeActivity
should only be responsible for navigation.Tasks
Extract this code from
HomeActivity
The text was updated successfully, but these errors were encountered: