Project

General

Profile

Actions

Bug #432

closed

Browsing and setting directory for export does not work correct

Added by Frank Vasterling almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Next Release
Start date:
05/05/2019
Due date:
% Done:

0%

Estimated time:

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

Actions #1

Updated by Soren Stoutner almost 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.

Actions #2

Updated by Soren Stoutner almost 5 years ago

This also affects the saving of the LogCat.

Actions #3

Updated by Soren Stoutner almost 5 years ago

  • Status changed from New to Closed
  • Priority changed from 3.x to Next Release
Actions #4

Updated by Soren Stoutner almost 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. ;)

Actions #5

Updated by Frank Vasterling almost 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.

Actions #6

Updated by Soren Stoutner almost 5 years ago

That's good to know. If you experience any difficulty with any other file browser, let me know.

Actions

Also available in: Atom PDF