Skip to content

Bucket Picker#29

Closed
zealot128 wants to merge 6 commits intoPhotoBackup:masterfrom
zealot128-os:galleryPicker
Closed

Bucket Picker#29
zealot128 wants to merge 6 commits intoPhotoBackup:masterfrom
zealot128-os:galleryPicker

Conversation

@zealot128
Copy link
Contributor

Work in progress.

Regarding #7, i've added a new preference which queries all the Buckets from the Content SQL (Buckets == Folder):

large_screenshot_20160516-142107

Then, on upload, the Photo is checked against that bucket and skipped if not matched.

  • If there is no Photo selected, every photo will be uploaded (backwards compatible)
  • I've put all the SQL stuff into a new class
  • I've also fixed the 409 again ... last time I put that if clause only in the test call, not in the real upload call ... guess I messed up on Rebasing.
  • I wrapped all OKclient calls in a try ... finally call, as there was a warning by OK that one should always close the body on a response.

TODO:

  • fr, cz translations
  • Also filtering the photos in the journal (will do later)
  • Tests?
  • I would welcome any comments on the code. Like I said last time, I am not very familiar with Android platform and just got in working with Stackoverflow and TAB-TAB-TAB :-)
    As there are no tests yet, I am not very confident that I didn't break anything ^^

@stephanepechard
Copy link
Member

Thanks for this. I need to test it first, and to release your previous work.
It's hard to find time these days...

@zealot128
Copy link
Contributor Author

I've rebased the branch and also filtered the UploadJournal according to the selected buckets.
It works good for me atm.

@zealot128
Copy link
Contributor Author

sorry if there is too much pull requests from me, thus work for you :)

Pls take your time to review my changes, they might work, but as I said, I am not using Java/Android in my day job.

Good to test with other devices + server implementations anyway.

@stephanepechard
Copy link
Member

Yes, this one will need more tests, maybe a dedicated branch to properly work on it.
Will check the other PR first.

@zealot128
Copy link
Contributor Author

Yeah. I've also tried to add some AndroidTests yesterday, but stopped, as running the emulator on my machine is no fun.... (Also took a lot of time just to figure out how to run them, I needed to move the folder structure a little around...)

I also created a test-server here:
https://photobackup-testserver.appspot.com/

That doesn't save uploaded pictures, but otherwise should react similarity like a real server, and I planned to use it for testing inside Travis...

zealot128 added 5 commits May 20, 2016 10:47
- New Preference which loads bucket names ordered by containing photo count
- All SQL cursor creation into new Class PBMediaStoreQueries
- Also: Fixed the 409 - was only on TestCall but not the real upload
  call
@zealot128 zealot128 changed the title Bucket Picker (WIP) Bucket Picker May 20, 2016
@stephanepechard
Copy link
Member

I began to write some Android tests too using Espresso.
My problem is that the project was first written with Eclipse and that it does not comply with the modern Android app structure. Hence documentation is not well applied.
I planned to make it fit the new arch but it will probably break your PR...
I have to think a bit about this

stephanepechard added a commit that referenced this pull request Aug 14, 2016
Now the user can select origin for the pictures, given a list of the Android media store buckets.
This includes some sanity refactor for more readability.
@stephanepechard
Copy link
Member

Integrated and a bit rewritten in 280039a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants