How can I set initial path for file picker #118
-
Thank you for simple library! How can I set initial path for file picker? It seems .. not working third argument of openFilePicker function. Initial path is string that "/storage/emulated/0/Download/some path". It is opened on picked path by folder picker recently |
Beta Was this translation helpful? Give feedback.
Answered by
anggrayudi
Sep 22, 2023
Replies: 1 comment
-
You can, like this: class MainActivity : AppCompatActivity() {
private val storageHelper = SimpleStorageHelper(this)
override fun onCreate(savedInstanceState: Bundle?) {
// ...
storageHelper.onFileSelected = { requestCode, files ->
// do stuff
}
}
private fun openFilePicker() {
storageHelper.openFilePicker(initialPath = FileFullPath(this, "/storage/emulated/0/Download"))
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
anggrayudi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can, like this: