Skip to content

Comments

[WIP] Extend instant upload#1650

Closed
tobiasKaminsky wants to merge 12 commits intomasterfrom
extendInstantUpload
Closed

[WIP] Extend instant upload#1650
tobiasKaminsky wants to merge 12 commits intomasterfrom
extendInstantUpload

Conversation

@tobiasKaminsky
Copy link
Contributor

This allows to choose any folder on the phone to sync in one direction to owncloud, just like the instant upload does this for images.
This can fix the problem of not using the correct NEW_PHOTO Action and it can also help to "backup" important folders (like WhatsApp Images).

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @jabarros, @davivel and @owncloud-bot to be potential reviewers

@tobiasKaminsky
Copy link
Contributor Author

@davivel before finishing this PR: does it have chances to get integrated?
It will not be a 2way sync but instead just extend the instant upload.

@hitam4450
Copy link

👍 👍 👍

@tobiasKaminsky
Copy link
Contributor Author

@davivel ping.
This is requested by many open issues.

This PR could also then be a starting point to get a real 2way sync for certain folders?

<!--
ownCloud Android client application

Copyright (C) 2012 Bartek Przybylski
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed

@davivel davivel mentioned this pull request May 18, 2016
2 tasks
@davivel
Copy link
Contributor

davivel commented May 20, 2016

Mmm, I don't get it works. My last try was setting as folder to observer the one where Telegram stores the images, and tried both to add an image there and to modify an existing one. None of them triggered and upload.

Still didn't see the code, will have a look right now.

</receiver>

<service android:name=".services.observer.FileObserverService" />
<service android:name=".services.observer.InstantUploadFolderObserverService"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather add functionality to FileObserverService instead of adding a new Service to the app. There are too many services right now.

@Override
public void onCreate() {
// TODO start Observer for each stored Entry
File sdcard = new File("/mnt/sdcard/DCIM/Camera/");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path to the SD Card should not be hardcoded. Probably we'll need using several methods from https://developer.android.com/reference/android/os/Environment , with different paths depending on Android version.

@davivel
Copy link
Contributor

davivel commented May 20, 2016

OK, I read the code, now I see why it was not working for me. I will follow in #744


if (preference.saveAll()){
Intent preferencesIntent = new Intent(MainApp.getAppContext(), Preferences.class);
startActivity(preferencesIntent);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the flow of the app. Instead of starting again the Preference activity, this block should just call finish(); the app will be back to the activity that started this one (that is Preference).

@nayessiva77
Copy link

Hi guys, sorry to bother you, I found out about your discussion and this is exacly what i expect owncloud to do. How can i apply your changes on my android ?

Thanks for your contribution ! :D

@davivel
Copy link
Contributor

davivel commented Aug 2, 2016

@nayessiva77 , sorry, but I'm afraid this is not working yet.

@davivel davivel changed the title Extend instant upload [WIP] Extend instant upload Aug 2, 2016
@nayessiva77
Copy link

damned...

@davivel
Copy link
Contributor

davivel commented Sep 2, 2016

This has been partially subsumed by #1783 . Issue #744 will remain open, but this code will strongly conflict with master, so I'm sorry, but need to be closed.

@nayessiva77 , not sure if it will cover all your use case, but maybe you want to give a try to version 2.1.1 just-released. You will be able to select your favorite camera folder to observe for new pictures or videos in it.

@davivel davivel closed this Sep 2, 2016
@davivel davivel deleted the extendInstantUpload branch September 2, 2016 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants