Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload when charging #745

Closed
wants to merge 14 commits into from
Closed

Upload when charging #745

wants to merge 14 commits into from

Conversation

tobiasKaminsky
Copy link
Contributor

See #465

@LukeOwlclaw
Copy link

Nice! I just added KEY_WHILE_CHARGING_ONLY to the new FileUploadService (--> https://github.com/owncloud/android/tree/reliable_uploads). It'll take care that upload does not start while discharging. Starting at the right moment is missing still though. I think the broadcast receiver for ACTION_POWER_CONNECTED should go into a separate class (just like BootupBroadcastReceiver). There may be other features to come which also rely in that event.

@tobiasKaminsky
Copy link
Contributor Author

But this is an option like for instant uploads?
About refactoring: You are right.
Maybe there will be soon other events that can be included in one BrodcastReceiver.
Especially when a more generic instant upload is coming (#744)

@LukeOwlclaw
Copy link

But this is an option like for instant uploads?

Yes, it is but it can also be used for other uploads.
The idea is that the InstantUploader just tells the UploadService would to do. So all it does:

Intent i = new Intent(context, FileUploadService.class);
i.putExtra(FileUploadService.KEY_LOCAL_FILE, file_path);
...
i.putExtra(FileUploadService.KEY_WIFI_ONLY, instantPictureUploadViaWiFiOnly(context));
i.putExtra(FileUploadService.KEY_WHILE_CHARGING_ONLY, instantUploadWhenChargingOnly(context));
context.startService(i);

No need to worry about being not connected or not charging. The UploadService will handle that.

@jancborchardt
Copy link
Member

@tobiasKaminsky can you post a screenshot of how this looks like so I can design-review it?

@tobiasKaminsky
Copy link
Contributor Author

upload_1
upload_2

Currently there is only one "upload when charging", but two "upload on wifi"...
I do not know what my intention was...

@masensio
Copy link

masensio commented Sep 1, 2015

Hi @tobiasKaminsky!

I'm reviewing this PR. The branch is outdated, but don't worry. I will updated it.
I'll cross my fingers when resolve conflicts

masensio added 2 commits September 1, 2015 16:51
Conflicts:
	res/values-fr/strings.xml
	res/xml/preferences.xml
</PreferenceCategory>

<PreferenceCategory android:title="@string/prefs_category_instant_uploading" android:key="instant_uploading_category">
<com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle android:key="instant_uploading"
<PreferenceCategory android:title="@string/prefs_category_instant_uploading"
Copy link

Choose a reason for hiding this comment

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

Maybe, it is necessary to review the order in the preferences.xml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jancborchardt can review the order?

Copy link
Member

Choose a reason for hiding this comment

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

Which order is this actually?

@rperezb rperezb added this to the backlog milestone Oct 15, 2015
@tobiasKaminsky
Copy link
Contributor Author

@jancborchardt Please have a look here

@jancborchardt
Copy link
Member

Looks good! Just a few details:

  • can you change the text to »Upload folder«?
  • can you change »WiFi« to »wifi«?
  • I assume the folder, wifi and charging options are greyed out when the main instant upload option is not enabled?

@tobiasKaminsky
Copy link
Contributor Author

ref 1:"Upload folder"? We do not support this currently, or?
This is all about the option, that the upload only starts if the phone is charging.

2: I will change
3: As far as I remember, they are not visible, if the main option is disabled.
--> they are greyed out

@jancborchardt
Copy link
Member

@tobiasKaminsky right, if we call it »Upload folder« it might get confusing. »Upload path« is better, but with »path« in lowercase.

@tobiasKaminsky
Copy link
Contributor Author

instantupload1

Should "when charging" be independent for picture and video as "on wifi"?

@tobiasKaminsky
Copy link
Contributor Author

Updated text:
instantupload2

@jancborchardt Remaining question is, if "when charging" should be an independent setting for picture and video? This could be a good idea as videos are very big and can drain the battery very quick...

@jancborchardt
Copy link
Member

@tobiasKaminsky yeah, I would make the setting independent. Right now on the very top it’s kind of confusing anyway.

@tobiasKaminsky
Copy link
Contributor Author

instantupload3

@jancborchardt
Copy link
Member

Yeah, looks good!

@jesmrec jesmrec changed the base branch from develop to master June 18, 2019 11:45
@CLAassistant
Copy link

CLAassistant commented Oct 28, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ tobiasKaminsky
❌ masensio


masensio seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@michaelstingl michaelstingl removed this from the backlog milestone Dec 16, 2019
@hannesa2 hannesa2 deleted the uploadWhenCharging branch July 12, 2021 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants