implementation "com.anggrayudi:storage:0.9.0"
private lateinit var storage: SimpleStorageHelper
storage = SimpleStorageHelper(this)
storage.onStorageAccessGranted = { _, root ->
Toast.makeText(
this,
getString(
R.string.ss_selecting_root_path_success_without_open_folder_picker,
root.getAbsolutePath(this)
),
Toast.LENGTH_SHORT
).show()
}
storage.onFileSelected = { _, file ->
Toast.makeText(baseContext, "File selected: ${file.fullName}", Toast.LENGTH_SHORT)
.show()
val fileLocation = file.getAbsolutePath(this@UploadDocument)
logUtil.logV(">>>>> the name is : ${file.name}")
logUtil.logV(">>>>> if file : ${file.isFile}")
logUtil.logV(">>>>> the location : $fileLocation")
gotFile(
File(fileLocation)
)
}
storage.openFilePicker(REQUEST_CODE_PICK_FILE, "image/*", "application/pdf")
V: >>>>> the name is : IMG-20210712-WA0000.jpg
V: >>>>> if file : true
V: >>>>> the location :
Library version: 0.9.0
OS version: [Android 10]
Device model: [Vivo v11 Pro]
Describe the bug
Getting
getAbsolutePath{}as blank but the name is there.To Reproduce
Stacktrace