Android: Automatic download for already downloaded file when file updated?

Created on 14 Dec 2013  路  28Comments  路  Source: owncloud/android

I just ran into this issue:

A few days ago I downloaded a file with Android ownCloud -> Green triangle with down arrow appeared.

Today I wanted to view the file again (it was updated on the server in the mean time). The file date was updated, so Android ownCloud detected a file change. The green triangle stayed however. When selecting the file, it opened the old version of the file (which I of course noticed too late).

Solution: Long click on file "Update file". This is not intuitive.

Possible fixes:

Suggestion A:
Delete offline file when update is detected (green triangle dissappears as soon file date changes).

Suggestion B:
When clicking an updated file warn user that file has changed on server and suggest to download uptodate copy.

Suggestion C:
When clicking file, download new version. In case of no connection, suggest to open old version of file.


EDITED @rperezb and @owncloud/android-developers :

  • Taking into account the feedback in this issue as well as the current behavior of the ownCloud iOS app the option selected is *_C - When clicking file, download new version. In case of no connection, open old version of file *_
  • In case of conflict (different versions local and server) the way to go is the regular one:

    • Open the local version

    • Set the file as conflict one (labelled with the icon)

    • Fix the conflict taking advantage of the sync option where the user will be offered to rename, duplicate or cancel


EDITED @malkomich:
TASKS

  • [x] [GIT] Create 333_update_server_changes_on_download_files branch from master in android repo @malkomich
  • [x] [DEV] Perform a sync operation when the file is opened @malkomich
  • [x] [DEV] Launch an advise and capture it when the sync/download operation finish @jabarros
  • [x] [DEV] Update dinamically the content of the file on the file preview @jabarros
  • [X] [QA] Create 333_update_server_changes_on_download_files branch from master in QA repo @jesmrec
  • [X] [QA] Merge 333_update_server_changes_on_download_files branch into master in QA repo (PR #1736)
  • [X] [QA] Create test plan @jesmrec
  • [X] [QA] Validate test plan @mcastrosg
  • [ ] [GIT] Merge 333_update_server_changes_on_download_files branch into master in android repo

BUGS

Design approved by qa enhancement available_offline download

All 28 comments

Pinging @jancborchardt and @javiergonzper to have a look here. Something in this sense is being done in the iOS app in this sense, but I don't have the details in my head.

Yes, a notice like 禄filename was updated on the server.芦 would be good. Then with options to 禄View old file芦 or 禄Download new version芦.

I think the file should be updated when clicking on it without any saying (or "file was updated on server. Downloading new version").
But no option as the user has downloaded the file time ago and at least for me there is no use in presenting him an old version/different version than the one on the server.

I totally agree with @tobiasKaminsky. Anything else is just too complicated. Even when the file is a bit bigger and you鈥檙e on mobile, you would still see the download bar and be able to cancel it.

I agree with @tobiasKaminsky and @jancborchardt the file should be updated when clicking on it. it's probably the simplest and most logical behavior.

This is really annoying :( That lead to loss of content.
Can the file be updated when clicking on it please ?
Thanks !

Validated, but not merged yet.

I'll go for that.

Bug

Steps

  1. Upload from app a new mediafile (video/audio)
  2. Set the file as av. offline
  3. Connect to the server using a browser and replace the file with another audio/video
  4. On app pull down on the folder that contains the file in order to update
  5. Press on the media file and check that the updated version is reproduced.

Actual behaviour

App does not reproduce the updated version, just the old one.

Expected behaviour

Updated version should be reproduced.

Device: Nexus 5
Android Version: 6.0

OK. Taking care. The steps are not exactly what this issue is about, but the cause of failure is.

Problem with video and audio files are fixed now; but, I discovered similar problems with other files. I updated the first comment with new bugs.

Image files are also refreshed with updates in server.

Going for the next.

Bothering dialogs and toasts out of sight. Going for the next.

@mcastroSG , I'm done. Let's talk about those problems with background sync

Bug

Steps

  1. Upload from browser a new pic to the server
  2. Pull down on the app to refresh
  3. Tap on the pic to download it
  4. Upload a different pic with the same name from browser to server
  5. Pull down on the app to refresh
  6. Tap on the pic to download it again

Actual behaviour

Image is not updated with new version

Expected behaviour

Old image should appear while new version is downloaded and at this point the image should change to the new.

Device: Nexus 5
Android Version: 6.0

Should be fixed now, @mcastroSG

Bug

Steps

  1. Create a new txt file on root server folder
  2. Pull down on root folder to refresh
  3. Tap on txt file to download it
  4. Set wifi off on mobile device
  5. Edit txt file on mobile device
  6. Edit txt file on server
  7. Enable wifi on mobile device
  8. Pull down on root folder to refresh
  9. Tap on txt file
  10. Select Keep both files on Conflict Dialog

Actual behaviour

We obtain two final files but progress upper bar does not stop and X button to cancel does not work anymore, seems that once process ends current view is not refreshed or ended.

Expected behaviour

We obtain two final files and once we have resolve the conflict file view appears on screen again.

Device: Nexus 5
Android Version: 6.0

Bug

Steps

  1. Long push on a photo to select it and enable available offline
  2. Tap on the same file in order to unselect it
  3. Tap on another photo

Actual behaviour

App crashes

Expected behaviour

App should not crash

Device: Nexus 5
Android Version: 6.0

Bug

Steps

  1. Create a new txt file on server
  2. Pull down on app to refresh
  3. Tap on the file
  4. Select from three dots button available offline

Actual behaviour

There is no overlay icon associated to available offline, even after pull down again to refresh. In order to get the proper overlay we have to navigate to other folder and come back.

Expected behaviour

A new overlay icon should appear and in case we push three dots button Unset available offline option should appear too.

Device: Nexus 5
Android Version: 6.0

Thanks, @mcastroSG . I'll fix the new bugs now.

He, the third one is a classic. But maybe I had an idea :)

Wrong UI after solving conflict -> fixed.

Crash -> fixed

And once again, all the known bugs are ready to be tested.

@davivel. The steps mentioned in https://github.com/owncloud/android/issues/333#issuecomment-234173901 make the app crash after selecting "Keep Both"

Nooooooooooooooooooooo

I'll have a look

@jesmrec , it's fixed now! :)

@davivel fixed! and approved!!

Thank you very much @davivel !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davigonz picture davigonz  路  7Comments

jesmrec picture jesmrec  路  3Comments

michaelstingl picture michaelstingl  路  4Comments

davivel picture davivel  路  4Comments

sd1998 picture sd1998  路  5Comments