Bug #432
closedBrowsing and setting directory for export does not work correct
0%
Description
When using the function "Import/export", the browsed directory is not correctly set in the field "Filename" (Dateiname).
Step 1: Open function "Import/Export" in menu
Step 2: Select "export"
Step 3: The field "Filename" is populated with "/storage/emulated/0/Einstellungen.pbs"
Step 4: Use Button "Browse" (Durchsuchen) right from this field
Step 5: Navigate to "Downloads", then "Settings" and finally "Privacy Browser". Confirm. After that the field "Filename" is filled with "/storage/emulated/0//storage/emulated/0/Download/Settings/Privacy Browser/Einstellungen.pbs"
Not a big thing, the field is editable, so it can be fixed manually by deleting the beginning "/storage/emulated/0/".
Frank
Updated by Soren Stoutner over 5 years ago
I am not able to replicate this bug on my Pixel 2 XL running Android 9 (API 28). My guess is this is because your device is not using Android's default file browser, but either a modified file browser that is based on Android's code or a custom file browser that is designed by the OEM of your device.
This is even more complex because the file browser does not return a direct file path, but rather a content URI. https://developer.android.com/reference/android/content/ContentUris. This then has to be converted to standard file format.
There is a section of code in ImportExportActivity at https://git.stoutner.com/?p=PrivacyBrowser.git;a=blob;f=app/src/main/java/com/stoutner/privacybrowser/activities/ImportExportActivity.java;hb=HEAD under `onActivityResult` that handles this conversion. I am going to add an entry for results that already start with `/storage/emulated/` to deal with this scenario.
Updated by Soren Stoutner over 5 years ago
This also affects the saving of the LogCat.
Updated by Soren Stoutner over 5 years ago
- Status changed from New to Closed
- Priority changed from 3.x to Next Release
Updated by Soren Stoutner over 5 years ago
Because I don't have a device that exhibits this behavior, I can't test to make sure I have fixed it correctly. Would you be willing to test a debug build and see if it works?
https://owncloud.stoutner.com/index.php/s/U2nd51u34RaT85j
Note, because this is signed with a debug certificate, you will not be able to install it over your existing app. You will need to uninstall the production release of Privacy Browser first (and do the same in reverse to install any updates released through normal channels). Also, the above link will expire after a few days. ;)
Updated by Frank Vasterling over 5 years ago
Soren Stoutner wrote:
Because I don't have a device that exhibits this behavior, I can't test to make sure I have fixed it correctly. Would you be willing to test a debug build and see if it works?
https://owncloud.stoutner.com/index.php/s/U2nd51u34RaT85j
Note, because this is signed with a debug certificate, you will not be able to install it over your existing app. You will need to uninstall the production release of Privacy Browser first (and do the same in reverse to install any updates released through normal channels). Also, the above link will expire after a few days. ;)
Downloaded and tested: works fine! Thanks for fixing.
Btw: I use fx-Fileexplorer, not the normal filemanager coming with Omnirom.
Updated by Soren Stoutner over 5 years ago
That's good to know. If you experience any difficulty with any other file browser, let me know.