i want to choose a file (via file chooser) from astro manager (in my case a *.pdf or *.doc) but the uri contains only the file path ("sdcard/my_folder/test.pdf"
). For my application i need the content path like that from image chooser (content://media/external/images/media/2
). Is there any way to convert a "file:///"
to "content://"
uri?
Or has anybody an other idea how to solve that problem?
best regards
UPDATE: the main problem is that after i choose my file with filechooser valuecallback.onReceiveValue(uri) method adds a "/" behind the path. So i get an uri like this: "sdcard/my_folder/test.pdf/" and my application thinks pdf is a folder. When i use content uri from image chooser it works.