Available Offline - Doesn't sync in the background

android
help

#1

Please help us by providing the following info.

Steps to reproduce
1. Set any folder in ownCloud app as "Available Offline"
2. Go into any other application or the home screen
3. From another device or computer add items to that same folder
4. Nothing happens on the Android device
5. Open ownCloud app and then it realizes things need to sync and all is fine

Expected behaviour
One would expect a background task to check for changes to folders that are marked "Available Offline" and automatically sync them once in a while without having to manually open the app. Be it once per hour or what ever. (user defined would be best if it can't "sense" the change)

Actual behaviour
No sync happens until the app is manually opened again.

Mobile client configuration
Client OS Android
Client version: 6 & 7

Server configuration
Operating system: Linux
Web server: Apache
Database: MySQL
PHP version: 7
ownCloud version 2.3.0


#2

Most likely the issue reported to the developers of the android app here:


#3

@schworak, as @kljhlkhglklfgh pointed, new files in the folders are not added to ownCloud. That's the current behaviour, that we could extend to add new files too.

Updates on existing files should be pushed to the server.


#4

I am not really worried about new files that I might add to the phone. Dropbox and others act the same way. You have to add the picture to the cloud program for it to go up to the server.

I am more worried about the files that are synced with the server never going out to other Android devices automatically.

For example, I am on my laptop and I change one of the existing files, it syncs automatically with the ownCloud server. It will never sync with the Android devices until I open the ownCloud program manually on each device.

This is not what I would expect from a folder marked as "Available Offline". It is how it works, just not what what is expected.

It would be nice (and I wouldn't think too hard knowing a little about Android programming) to check once in a while (hourly, daily even) when folders are marked this way.


#5

@schworak, you can improve the synchronization of available offline folders enabling the automatic synchronization of the account. Go to your device settings > Accounts > ownCloud , and enabled automatic syncs for the account you wish. This option is disabled by default when you install the app. Both the metadata of the full tree of files and the contents of av-off files will be automatically sync'ed periodically.

There is another service in the app watching for changes in the av-off files that should upload them as soon as they are changed even with that option disabled, but we know of some devices where this service is getting killed by the system more often that what we'd like.


#6

Thanks so very much!!!! I am no slouch but that had not occurred. And I hadn't seen that in any of the docs I had read.

Files are syncing now!


#7

Happy to help :slight_smile:

We need to do a lot of work to communicate better how the app syncs, specially updating the docs.


#8

Sorry to chime in…
I have a Samsung A3 phone running Oreo (8.0). I have a folder marked as “Available Offline”. “Auto sync data” is enabled for all accounts (there is no such setting per account). The app is 2.7.0, my ownCloud server is 10.0.8.
When I update (on the PC) a file in this folder, it is synched (uploaded) to the ownCloud server, but the file on the phone doesn’t get updated – even after many hours.
As soon as I start the ownCloud app the file gets updated.
How can I find out what I am doing wrong?


#9

seems to be an issue related with Android system (newer than 6.0), that cuts off the background processes.


#10

Given that 6.0 was released in 2015, and “available offline” somewhere in 2016 I’m surprised to see that it (still) doesn’t work.


#11

Maybe it is the opposite and it worked and now got broken in newer Android versions like 7 or 8? From what i have read in the past Android is breaking more and more apps relying on background task because it is just killing such tasks for saving battery / power.

Update:

Seems i have found the info: https://developer.android.com/about/versions/oreo/background but i’m not sure if this has any relevance on this topic?


#12

What bugs me is that noone informs the user that this functionality is broken. If it doesn’t work with Android 6, 7, 8, … the app can detect this and remove the settings from the screen. Or issue a warning “this doesn’t work on your version of Android”.
Now you have to find out the hard way, after hours of fiddling and trying. That’s not fun.


#13

Maybe its not known to the app developer that this functionality doesn’t work as expected? Or the function works generally and only some specific environments (e.g. battery saver apps, Android ROMs etc.) or Android versions are showing this issue?


#14

May I assume it works flawlessly for you?
What specific environment do you have?


#15

Personally i havn’t used this function for a while. But it seems it was working for @schworak on Androind 6 and 7 one year ago after the hint of @davivel some posts above.