When I select any pdf file from storage and open it through chooser intent(Intent_View), I want to get the path of that file in this intent.
override fun onNewIntent(intent: Intent?) {
    super.onNewIntent(intent)
    receivedIntent = intent
    receivedType = receivedIntent?.type
    if (receivedIntent?.data != null) {
        receivedUri = receivedIntent?.data!!
        Log.i("path", "onNewIntent: ${receivedIntent?.data!!}")
        if (receivedType == "application/pdf"){
            findNavController(R.id.fragmentContainerView).navigate(R.id.pdfReader)
        } else if(receivedType == "application/epub+zip"){
            findNavController(R.id.fragmentContainerView).navigate(R.id.epubFragment)
        }
    }
}
 
    