WelcomeActivity has a continue button that does this:
binding.button?.setOnClickListener {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED) {
val intent = Intent(this, SetupActivity::class.java)
startActivity(intent)
finish()
} else {
checkPermission(Manifest.permission.CAMERA, PERMISSIONS_REQUEST_CAMERA)
}
}
This (suspectedly) gets you stuck if the permission is not granted and the system's rate limit for asking the user for the permissions is exceeded.