nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.21k stars 1.75k forks source link

[TOP] Enhance sync folders #285

Open tobiasKaminsky opened 8 years ago

tobiasKaminsky commented 8 years ago

As discussed on conf this is a collaboration between @AndyScherzinger and me. Purpose:

mgutt commented 5 years ago

@mase76 Try to open recent apps, hold your finger on the NextCloud app and use the lock symbol to forbid the OS to kill the app in the background. I'm using this for FolderSync for a year now without any problems and FolderSync's "Instant Sync" was broken, too.

mase76 commented 5 years ago

I disabled battery optimization and allow background activity for the nc app. I also see, that there were syncing processes in tbe android account settings. But nothing happened. Even changes of existing files are not synced, until I trigger it manually.

mgutt commented 5 years ago

@mase76 I did everything what you set up too and Folder Sync never synced files until I used the locking. You should give it a try.

thrdroom commented 5 years ago

@Henry78, @mgutt , I doubt it will help in any way since existing developers are already employed by Nextcloud and they get paid more than that. There is an open pull request with bad code that hasn't been rejected or reworked in years, suggesting that current Android developer team has too much to do and they are drowning in cases, unable to deal with all the things going on in these cases. There are probably also no project managers that would go through the ton of bug reports that exist for different Nextcloud projects and set some priorities. I could not even find any publicly available roadmaps, except for the desktop app, which suggests that there is no clear common plan on where things are going and teams might be working in silos.

Nextcloud marketing team keeps introducing some gimmicky features like live video confirmation to gain access to folders, and some other useless features that make it seem like Nextcloud has it all, while in reality it has too many bugs to be used for anything serious.

I guess the only way to get actual support on any of these cases is if you are a paying enterprise customer, which makes sense but it is still sad that they can't hire more people to manage the projects and fix such essential features as folder sync. Their sales must be really low. cry

Meanwhile if you need a working folder sync on Android - try Syncthing.

THIS is sadly SO TRUE!

Instead of fixing bugs or extend the features of basic-apps and funktions, nextcloud is only introducing more more features no regular user is using on a day-to-day basis.

I hope they start to change this...Nextcloud has a lot of potential. But it seems like they have a lack of focus.

nazzario commented 5 years ago

The sync folder is very unstable. Sometimes the android client has a message and not found the server and then comes the message Upload failure. But the auto upload is really bad. I hope you can fix it. The Problem is many years now. And when I looking for picture on my Photo folder the preview mostly not really load 70% loading and the rest not. Relaod again sometimes comes sometims not! The Client on Mac and Windows is really good but the android client is disappointed. Thanks for the work for that app but please fix that 2 issues.

mgutt commented 5 years ago

I tested it by myself now:

Next try:

Next try:

This is the same trick I need to use for FolderSync, Tasker, etc This is not really related to Nextcloud. It is something in the Android OS since Android 8 I think (I'm using Android 9 at the moment). But you are right. Other apps like Dropbox do not have this problem. I think they use a database and the android api to wake up the app randomly and check if there is a new file in the folder.

But as long the Nextcloud app is not updated the lock icon trick works perfectly. Try it by yourself.

Janhouse commented 5 years ago

@mgutt try this:

I think the app only uses Cursor to get new files. It doesn't list all of the files in them.

AndyScherzinger commented 5 years ago

@mgutt of course, simply since that isn't implemented (yet) - The auto upload implementation at this very moment only upload pictures/videos taken after the folder has been activated. Like you mentioned with the cursor, we query Android's Media Index

mgutt commented 5 years ago

@Janhouse & AndyScherzinger Ok, this was a definition problem. I answered @mase76 and @nazzario because they were complaining a non working "auto upload" function. They think its a bug, but its not a bug its the aggressive battery managment since Android 8 killing the Nextcloud app in the background so it can not auto upload anymore.

You are talking instead of the feature request "upload existing files". Of course this does not work as it was never implemented.

mase76 commented 5 years ago

There is no problem with auto-upload. This works all the time. The problem is to keep changed files, like my keepass db or the notes textfiles in sync.

mgutt commented 5 years ago

Do you have Android 9? There are problems. Look at the app reviews. The main complains are:

AndyScherzinger commented 5 years ago

@mase76 did you define a custom folder within auto upload?

@mgutt My device is Android 9 and it works like a charm, no issues ever. It is not specific to an Android version imho but rather OEM or/and device/model issues. So they are really hard to reproduce :/

mase76 commented 5 years ago

@AndyScherzinger Auto-upload works as expected. The problem is with changed files in synced folders or new files in these folders. I have a keepass db file synced between Linux desktops and Android. Also a notes folder full of txt files. These are permanently changed by the client machines. The desktops get the changes, but Android doesn't, until I trigger the sync of the folder(s) manually. Even when the file changes were made by the Android machine. This worked fine in the past, but stopped working during Android 8. Now I am on 9. Because auto-upload works on my device, the nc process was not killed. I allow bg activity and disabled battery optimizing. I see the account synced in Android's account settings, but no changes were applied.

Henry78 commented 5 years ago

@mase76 perfect summary! It worked a long time, since OwnCloud(!) but ia broken now. Keepass and notes. Exactly my use case.

korelstar commented 5 years ago

For synchronizing notes, you could alternatively use the notes app (for Nextcloud server and for Android).

swaechter commented 5 years ago

By accident I found a workaround how you can add existing images etc. for example phone screenshots:

  1. Attach your phone via USB cable to your PC and allow the MTP connection
  2. Somewhere on your PC, create a directory so you can Ctrl + X & Ctrl + V files into this directory
  3. Navigate to the image location on the phone via explorer on the PC
  4. Ctrl + X and Ctrl + V all images on your phone to the temporary directory on the PC
  5. Ctrl + X and Ctrl + V all images from your PC directory back to your phone

After this, the Nextcloud sync kicks in and will upload all images. I tried this for my phone screenshots only

mgutt commented 5 years ago

@swaechter You do not need a pc. You can move all files through an android file manager to an other folder and copy them back (if you have enough space). But both ways overwrite the file creation date. This is not a problem if your filename contains the date, but if not, you loose this data. If the video filenames does not contain the date you loose the record date forever as video files do not contain EXIF data like photos.

Kraowe commented 5 years ago

What I don't understand is that the iOS app has this functionality, you can check to upload all existing photos in it. Why not just look at how it's done in the iOS app? And then implement the same in the Android app?

trymeouteh commented 5 years ago

I would like to have Auto Upload changed to Sync Connections and work just like on the desktop client. Instead a uploading it will upload and download and you can set it on how often it will scan for uploads and downloads.

clawoflight commented 5 years ago

Seriously, how is this feature not prioritized more instead of all the gimmicks? This is the core functionality of a cloud offering!

szaimen commented 5 years ago

Yes, I think so, too. But in the moment there are so many bugs in this app, that need to get fixed before any enhancement can be made, imho. I also cannot understand while just one developer from Nextcloud is actively working on this app?

W-Hamra commented 5 years ago

What's so strange about that? If you know people willing to code for free, invite them.

szaimen commented 5 years ago

Because this should be one of the most important apps for Nextcloud and therefore shouldn't have that much bugs.

Janhouse commented 5 years ago

And Nextcloud GmbH is a company with paid employees.

lemmy04 commented 4 years ago

I'm kind of opposing to "increments" 5 and 6... unless the actual "sync" was optional.

My personal workflow regarding the picture sync folders goes like this:

at this point, a two way sync would delete the pictures off my phone - which I might not want to happen just yet also, sometimes I delete pictures off the phone before I move them into digikam on my desktop, which also would not be possible with a two way sync. So if those two additions get implemented they would need to be optional for me...

clawoflight commented 4 years ago

@lemmy04 simple, distinguish between auto-upload and sync, which are completely different concepts with distinct use-cases.

lemmy04 commented 4 years ago

@lemmy04 simple, distinguish between auto-upload and sync, which are completely different concepts with distinct use-cases.

that is exactly what I'm saying, I'd have auto upload turned on but full sync turned off.

clawoflight commented 4 years ago

And I'm saying they should be distinct features. Auto-upload based on local folders like it is now, and sync as extension of the sync functionality we have now, based on remote folders.

lemmy04 commented 4 years ago

And I'm saying they should be distinct features.

exactly my point.

Auto-upload based on local folders like it is now, and sync as extension of the sync functionality we have now, based on remote folders.

But WITH actually uploading what is in the folder when you initially turn on auto upload, see #4430

Bugsbane commented 4 years ago

Is there any kind of roadmap for increment 3? It seems that it was skipped for increment 4. Wondering if increment 3 or 5 will likely be next,

tobiasKaminsky commented 4 years ago

Increment 3 needs a server side support for checksums, otherwise we cannot make sure which files should be uploaded.

lemmy04 commented 4 years ago

...how are the desktop client and the iOS client avoiding this problem then, if it can't be done without server side checksums?

invertium commented 4 years ago

So is there any ETA for increment 3? It seems crazy that normal sync is possible but the auto-upload feature doesn't have it.

jospoortvliet commented 4 years ago

...how are the desktop client and the iOS client avoiding this problem then, if it can't be done without server side checksums?

They work rather differently. They fully control and monitor a folder, and keep it in sync all the time, storing information about each file in a database. They use a variety of heuristics, some very platform dependent, to determine when a file has to be synced. Even then, this has issues, which is why work on a virtual drive is happening.

I can indeed imagine that on a mobile phone, this is much harder and has more risks of data loss. You can of course say "if a local file has the same name and size as one on the server, don't sync." but that will occasionally mean data loss. So how else do you know if a file is the same as a local one? Download and compare, or checksums, are the only way.

The first is processing and bandwidth intensive, the second needs server support.

Of course, it could 'just' upload all missing photos, purely based on file name and size. I personally think that that is enough - photos are typically stored with a date after all.

For files, though, this would be risky. The chance that you have a few documents with the same size and the same name, at some point, is not anywhere near close to zero.

WRT the people who complain this was not high enough priority: we are indeed a company with paid employees. Paid by our customers. If you're not a customer, you're not paying us and you really can't expect us to work for you.

We set our priorities based on our own long term goal and on the needs of our customers. If you'd like to influence the choices we make, either contribute code, or become a customer...

Janhouse commented 4 years ago

We set our priorities based on our own long term goal and on the needs of our customers. If you'd like to influence the choices we make, either contribute code, or become a customer...

I guess Germans do it differently but I usually pay for software that actually works. 😆 Corect me if I am wrong, but Nextcloud GmbH is a software product company, not a consulting company that mainly does custom development. If the product has lots of bugs and roadmap doesn't mention solutions to those problems, I don't use such software. I donate more to open source projects yearly than I pay for SaaS subscriptions but in cases like private cloud there aren't any good self hosted options for private use. (I keep looking though)

I guess Nextcloud is mainly intended for use by small/medium companies and public organizations but that should be clearly stated in the marketing materials. People who are used to iCloud/Google cloud have some feature expectations which clearly are not met in case of Nextcloud, and seems like those features are not planned any time soon.

jospoortvliet commented 4 years ago

@Janhouse It seems we find ourselves in a chicken-egg situation, then. You want us to first fix all your issues for free, then you might want to 'donate'. We would like to get paid for our work and have some guarantee we get our salaries each month.

We don't ask you to pay for a software license. Nextcloud is open source, you can download our software for free, use it how you like and we don't solicit donations, least of all from small businesses or private users.

We're a serious business and our customers are serious, usually large enterprises. Those typically do a Proof of Concept before they decide on any solution. We help with that, advising on the installation and fixing issues they might encounter, or we commit to fixing them (or implementing features they need) after the contract is signed.

Of course, you can try to do a PoC without us, but then, yes, we won't commit to fix your issues for free and you typically won't get as good an idea what Nextcloud can do for you as you would when working with us.

In short, we make Nextcloud work for our customers. Everybody has different needs and different priorities and all software has bugs, so we can't make Nextcloud work perfectly for everyone on github in a reasonable time (before the the sun engulfs earth). That is the service our customers pay us for (among other things).

If you are serious about using Nextcloud in your business, you can contact our sales team to get our help with a PoC. If you don't want that, you can always contribute your code or wait until somebody else does.

alkemyst commented 4 years ago

@jospoortvliet I think you just clearly summarised the position of your company on this point. Since this appears to be a quite popular request for enhancement, though, would it be possible to crowdsource it somehow? I mean, if it were requested by a large company that company could pay for a similar feature: would it be possible to sum the requests of several private users, somehow?

Thanks for your feedback Stefano

AndreGeddert commented 4 years ago

Since this appears to be a quite popular request for enhancement, though, would it be possible to crowdsource it somehow? I mean, if it were requested by a large company that company could pay for a similar feature: would it be possible to sum the requests of several private users, somehow?

i would pay a small amount for that.

AndreGeddert commented 4 years ago

Maybe we can use this? https://www.bountysource.com/teams/nextcloud/bounties

drkmccy commented 4 years ago

Surely the upload timestamp tells you if the file needs to be synced or not, no need for checksums. Am I missing something?

ajvsol commented 4 years ago

"Increment 6 - sync two way" is referenced by this issue here and it already has a Bountysource for it, of which $200 was added by Nextcloud themselves so far. I'd suggest contributing more here for funding this long-awaited feature.

jospoortvliet commented 4 years ago

@alkemyst @AndreGeddert Bounties are generally useful to attract volunteers to a subject. The suggestion from @ajvsol is excellent. Hopefully somebody wants to get on that!

And yes, in theory, our company could pick up these tasks, but that is unlikely for 3 reasons:

Thinking about it, though, there are a third and fourth way to help get this issue done faster.

As third, just think: the bigger Nextcloud is as a community and user base, the more customers we tend to get, and the more people we can hire. And thus - we can do more work like this. So yes, your advocacy and spreading the world has a real effect on what we can do to improve the product. ALSO for home users, not just for customers. While we, as a reality, have to focus on earning our salaries, we personally all very much want to make Nextcloud great for private users, and we spend time on that. After all, we started Nextcloud to help people protect their privacy. And companies don't need to have privacy :smile:

Last but not least, you can simply be NICE. You'd be surprised how much grumpyness there is directed at our developers from users of a product they don't even pay for - and that is demotivating and absolutely not good for their productivity. A few nice words can be very helpful!

Of course, these last two are rather long term and indirect ways of helping. But we appreciate it!

:hugs:

Janhouse commented 4 years ago

I suggest that you remove "pr exists" tag and reject the pr, if that code is not relevant anymore. I doubt anyone will start working on this if they think someone is already on it.

Or even better - split this into smaller cases because description lists multiple things, and some of them seem to be working.

poiNt3D commented 4 years ago

I would love to recommend Nextcloud to all my friends, but it just doesn't work on Android. Correct me if i'm wrong, but Nextcould is presented like an open source alternative to Dropbox (Wikipedia agrees). File sync should be the main feature. It's like building a car without wheels. You say you want bigger community? Android is the most popular mobile platform. So you want this tiny community to find you 10k. It's not how Open Source works. First you need your product to be useful for everyone and then money will find you. I apologize if i sound too harsh, but it's just how it is. Not trying to hurt anyone's feelings.

lemmy04 commented 4 years ago

I would love to recommend Nextcloud to all my friends, but it just doesn't work on Android.

...and the attitude of some devs definitely does not improve it's standing.

lemmy04 commented 4 years ago

...how are the desktop client and the iOS client avoiding this problem then, if it can't be done without server side checksums?

They work rather differently. They fully control and monitor a folder, and keep it in sync all the time, storing information about each file in a database. They use a variety of heuristics, some very platform dependent, to determine when a file has to be synced. Even then, this has issues, which is why work on a virtual drive is happening.

I can indeed imagine that on a mobile phone, this is much harder and has more risks of data loss.

if it works on iOS (which is a mobile phone) why can't it work the same way on Android?

I'm being serious here - I use the auto upload feature for the pictures on my phone so that I don't have to take the SD card out or find a USB cable, especially now that the USB port is usually blocked by the headphones. I would be perfectly fine with "fully control and monitor", even if that means pictures will be deleted from my phone if i delete them from the sync folder on my PC - that's how I do it anyway: look at pictures, move them FROM the nextcloud folder TO either trash or my picture library.

All this stalling and meta discussing is NOT helping the public image that the user has of nextcloud.

But I guess that is a problem that a LOT of open source projects have...

Ablu commented 4 years ago

I really do not want to spam this topic more than it already is... But all the negativity really makes me sad. For me Nextcloud on Android definitely is working! Enhancement to the syncing would of course be very useful, but for a freely usable project it already works better than what I could hope for!

I get all the comments as mails because I am interested into further development on this topic. The negative comments do not really contribute to that...

lemmy04 commented 4 years ago

For me Nextcloud on Android definitely is working!

Are you saying that you can take a photo with your phone, and no matter what connectivity state your phone is in you can be always 100% sure that the photo will be uploaded to your cloud as soon as your phone reaches the right "connectivity state"? Because frankly, I can't - and on my phone the client even is allowed to upload through cellular data...

Ablu commented 4 years ago

Are you saying that you can take a photo with your phone, and no matter what connectivity state your phone is in you can be always 100% sure that the photo will be uploaded to your cloud as soon as your phone reaches the right "connectivity state"?

Exactly :). I only upload on Wifi. If wifi goes away during upload it will try again later and eventually succeed. Never had a failure with that. If it does not work for you, I fear you hit a different issue. This issue seems to be about adding more advanced synchronisation features.

AndyScherzinger commented 4 years ago

I am with @Ablu, the feature has always worked for me on my OP3T which runs on Lineage OS nightlies.