79656003

Date: 2025-06-06 13:37:12
Score: 0.5
Natty:
Report link

I find solution. I forgot to pass permission from mainActivity to other fragment, so even after approving and navigating to the scanner section, there were no permissions there

Inside override fun onRequestPermissionsResult() i add:

val navHostFragment =
            supportFragmentManager.findFragmentById(R.id.nav_host) as? NavHostFragment
        navHostFragment?.childFragmentManager?.fragments?.forEach { frag ->
            frag.onRequestPermissionsResult(requestCode, permissions, grantResults)
        }
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Stanisław Olszak