Android: Back-Navigation in File-Upload

Created on 30 Mar 2019  Â·  13Comments  Â·  Source: nextcloud/android

Actual behaviour

  • Back-navigation in file upload activity does not work, it shows a storage chooser dialog

Expected behaviour

  • it goes back to previous activity

Steps to reproduce

  1. Open app
  2. Click on '+'-Fab
  3. Choose upload files
  4. Click Back in navigation bar

Environment data

Android version: 7.1, 1, 8.1.0, 9.0

Device model:
Moto G5, Moto G4 Play, Samsung Tab S2

Stock or customized system:
Both

Nextcloud app version:
3.5.1, Dev 20190327

Nextcloud server version:
15.0

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

bug pr exists stale

Most helpful comment

@tobiasKaminsky good point. I'll look into it and update the PR (which is where we should continue this discussion imo)

All 13 comments

GitMate.io thinks possibly related issues are https://github.com/nextcloud/android/issues/3270 (Upload existing files), https://github.com/nextcloud/android/issues/3631 (upload fails), https://github.com/nextcloud/android/issues/145 (Upload -> no possibility to go back), https://github.com/nextcloud/android/issues/1842 (Unable to Upload file... ), and https://github.com/nextcloud/android/issues/2792 (Stuck when upload some files).

I can reproduce this issue and I also agree that the back navigation arrow in this case should pop the activity from the stack and not go to a storage selection dialog but I suspect some people might disagree.

Pull request with the fix for this created.

The idea behind this was that people do get to know the file chooser dialog, as this was freshly introduced.
Additionally there is a cancel button, so you can always exit from file uploader.

@AndyScherzinger I have no problem with removing this…

@tobiasKaminsky the FileUpload code seems to indicate that there is supposed to be a menu option for showing the file chooser dialog.

https://github.com/nextcloud/android/blob/e4f1ab4030dca8e04960b840d9a36489746eea72/src/main/java/com/owncloud/android/ui/activity/UploadFilesActivity.java#L319-L320

I'm not seeing that menu option anywhere in the UI though. Yet-to-be added perhaps? If so, I'd argue that it's better to show the storage chooser dialog through a menu option than the back button.

Up to you guys though.

You should be able to see it on upper right as an sdcard icon:
2019-04-01-092757

Gotcha. My bad. Then it's there!

@AndyScherzinger I have no problem with removing this…

I am also fine with removing it. A future, not yet present PR would need to chnage this anyways since navigating into a folder with unsufficient permissions would the replace the files view with the chosser list anyways and another back button hit would then have to close the screen.

@ardevd @tobiasKaminsky does the PR make sure this is only happening on back-pressed? Just asking since actively navigating into a folder with unsufficient permission would still need to show the chooser and not close the screen in my opinion.

@ardevd @tobiasKaminsky does the PR make sure this is only happening on back-pressed? Just asking since actively navigating into a folder with unsufficient permission would still need to show the chooser and not close the screen in my opinion.

Good point.
From code it seems to happen indeed, which is wrong.
So we need two checks

  • if parentFolder is not readable: show location chooser
  • if folder is "/" and back is pressed: exit

@tobiasKaminsky good point. I'll look into it and update the PR (which is where we should continue this discussion imo)

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

This issue still persists.

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

This issue is still valid.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daywalk3r666 picture daywalk3r666  Â·  3Comments

JSoko picture JSoko  Â·  3Comments

rainer042 picture rainer042  Â·  3Comments

Tie-fighter picture Tie-fighter  Â·  3Comments

tobiasKaminsky picture tobiasKaminsky  Â·  3Comments