Skip to main content
improved formatting, removed unnecessary text
Source Link
barbsan
  • 3.5k
  • 11
  • 23
  • 29

. var imageUriPath = "" imageUriPath = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val split = (imageUri.path ?: "").split( ":")//split the path. split[1] } else { imageUri.path ?: "" } val file = File(imageUriPath)

add Add in onActivityResult onActivityResult, getting docx, or pdf file

*** hope it helps 🐬🐬🐬

var imageUriPath = "" imageUriPath = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val split = (imageUri.path ? : "").split(":") //split the path. split[1] } else { imageUri.path ? : "" } val file = File(imageUriPath) 

. var imageUriPath = "" imageUriPath = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val split = (imageUri.path ?: "").split( ":")//split the path. split[1] } else { imageUri.path ?: "" } val file = File(imageUriPath)

add in onActivityResult , getting docx, or pdf file

*** hope it helps 🐬🐬🐬

Add in onActivityResult, getting docx, or pdf file

var imageUriPath = "" imageUriPath = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val split = (imageUri.path ? : "").split(":") //split the path. split[1] } else { imageUri.path ? : "" } val file = File(imageUriPath) 
Source Link

. var imageUriPath = "" imageUriPath = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { val split = (imageUri.path ?: "").split( ":")//split the path. split[1] } else { imageUri.path ?: "" } val file = File(imageUriPath)

add in onActivityResult , getting docx, or pdf file

*** hope it helps 🐬🐬🐬