Piwigo / Piwigo-Android

Piwigo Native Android App
GNU General Public License v3.0
140 stars 43 forks source link

Looking for contributors #5

Closed jeff-amn closed 6 years ago

jeff-amn commented 7 years ago

I have been playing around with the code some and would be interested in working with others to help push this project forward. I work full-time so it would be a little here and there for me.

Are there others out there that would be interested in helping?

Phil - is this project on the back burner for you? Do you have any doc that outlines your path for development? Do you have time to architect this if others could do the coding?

ramack commented 7 years ago

I am a SW developer, so maybe I can contribute a bit - every now and then / I cannot drive it. But as I have an android phone since some weeks now I would be really interested in accessing my gallery from an app...

jeff-amn commented 7 years ago

Great to hear from you. Have you done any android development or Java in the past? I am an automation engineer - started programming when I was 12 - over 50 now. I have been looking at the code for a few months - I am starting to get a feel for it - but I have not done any Java programming in the past. I am more familiar with .net. Right now I am trying to figure out the mechinism that is used for touching an album to open it and selecting an item in the menu along with changing the screen to an album view.

Have you been able to download the code and compile/run it?

Jeff Ayers

Sent from my android device.

-----Original Message----- From: Raphael Mack notifications@github.com To: Piwigo/Piwigo-Android Piwigo-Android@noreply.github.com Cc: jeff-amn jeff@acs-design.com, Author author@noreply.github.com Sent: Thu, 15 Jun 2017 1:30 PM Subject: Re: [Piwigo/Piwigo-Android] Looking for contributors (#5)

I am a SW developer, so maybe I can contribute a bit - every now and then / I cannot drive it. But as I have an android phone since some weeks now I would be really interested in accessing my gallery from an app...

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/Piwigo/Piwigo-Android/issues/5#issuecomment-308829136

ramack commented 7 years ago

Hi yes, after creating and finding a workaround for #6 I was able to try the code. - But I see only the albums at the root of my gallery and I was not able to navigate into the sub-categories. I read from your response that it is the same for you, right?

I learned Java when I was in school, and did not really touch it since I started to study computer science, but I know some of the "new" concepts from the theoretical point of view. Anyhow, I still hope, that @Philio gets reattracted to play a major role.

Philio commented 7 years ago

Is this project on the back burner for you?

I started working on a commercial project so the open source stuff took a back seat for a while, but I potentially have some time available now

Do you have any doc that outlines your path for development?

Only what is on the readme, so not really!

Do you have time to architect this if others could do the coding?

It would be nice to get this project moving again, particularly with other contributors. I had a quick look through the code, a few libraries are quite out of date and need updating (simple), I was playing around with Android Data Binding shortly after the first public beta so there is definitely room for improvement here and needs a review before continuing. I've since built complete apps using this type of approach so probably just needs some refinement (there is no need to bind the view models so tightly to the lifecycle, for example), I also have a private project with some binding adapters in that provide quite a bit of time saving (plus there are other open source projects which provide similar).

ramack commented 7 years ago

@Philio, good to read from you. I am willing to contribute, but you have to guide me :-) I have a rough idea of what data binding is about but cannot do major refactoring or review, for now this seems on your list.

About the general status: is it right, that so far the app "just" displays the albums on the root and it is not possible to navigate or to show the images inside?

jeff-amn commented 7 years ago

Phil - good to hear from you - seems like the timing may be perfect for pushing the project along.

I am starting to get a fairly good feel for the structure of the project. I think for a lot of people being able to upload images to their albums is one of the highest priorities. I was successful in doing this in .NET - one of my plans was to get it working on a PC with C# and then use Xamarin for a simple implementation on Android. The other item is to be able to select an album to view the photos / sub albums. My thought is to try to implement this as easily as possible with minimal feature to begin with just to get something working and refactor later.

I did figure out last night how the authentication and accounts function - I did not realize that the accounts are Android accounts and can be added from the android settings account page. I also noticed that in the account list the first account is a guest account and for a long while was not able to figure out how to add another account. As the code is right now it is impossible to get past the first account in the account list. I also realized that it was the preferencesRepository that was the mechanism that let the program know the last account that was being used. Looking at the menu drawer I am assuming that the account list should be a drop down to be able to select an account.

FYI for others - here is the code that loads the account:

private void loadAccount() { preferencesRepository.setAccountName("xxx@www.yyyyyyyyy.com"); // to select another account String name = preferencesRepository.getAccountName(); account = accountHelper.getAccount(name, true); if (account == null) { finish(); return; } if (!account.name.equals(name)) { preferencesRepository.setAccountName(account.name); } User user = accountHelper.createUser(account); viewModel.setUser(user); }

I added the first line to be able to temporarily select another account.

I also realized last night that the main display of the main albums uses fragment AlbumsFragment to display each main album on the main page. But I cannot figure out the proper way to capture a click or touch event to be able to trigger other code to display the images of the album. Which leads me to another question - is AlbumItemViewModel the model for a single image or for the list of images in the album.

Looking forward to any thoughts you have on the direction you would like to see this project go.

jeff-amn commented 7 years ago

Raphael - is there a particular section you would like to work on?

ramack commented 7 years ago

not really any specific. For sure the features which I consider most useful would be also most interesting:

but I fear my competences are not sufficient for the top 2 points, as soon as we have them I might give a special view by date or the map view a try.

ramack commented 7 years ago

Hi Jeff, are you still working on this? Why not committing some code?

Regards, Rapha

ramack commented 6 years ago

I suggest to close this, as there is no real work to be done for it. - For sure contributors are always welcome, but keeping issues open forever is not what helps to achieve that, is it?

ramack commented 6 years ago

It seems, that this project doesn't need contributors, it needs a maintainer or lead developer to push that forward...

wiwie commented 6 years ago

hi all

any news on the development of this app?

I wanted to play around with it a bit, installed Android Studio, build the app and tried running it on my phone. However, after the "piwigo" banner it just crashes.

Any tips what I may be missing? Should this app be in principle compatible with any Android version?

ramack commented 6 years ago

mh, if you look at the commit history you recognize, that there is actually no development ongoing. @jeff-amn and myself tried to contribute but our capabilities were insufficient and @Philio refactored and pushed new versions of the libraries, but missed to put usable functionality...

If you want to try it out and it doesn't work, just create a new issue including the logcat or compile error and you might get some help.

jeff-amn commented 6 years ago

You can also take a look at my JCAWork verison. I have not had a chance to take a look at the changes that were last made by @Philio. Hoping to maybe have some time in the next couple of weeks.

plegall commented 6 years ago

The lack of official Piwigo application on Android is starting to be really problematic (even more when you compared with the always nicer iOS app maintained by @EddyLB). I understand that @Philio no longer has time to work on it and that @ramack and @jeff-amn can "help" but not "lead" on this project.

I plan to post an announcement to find a dev lead on the Android app. The idea is to reproduce the iOS app on Android. The overall design is already done, we need an Android implementation.

ramack commented 6 years ago

In the meantime my Android skills advanced slightly, but as I started to work on another app as single developer my time is quite limited. So I think an announcement with the search for a leader is a really good idea. And by this I mean: the best would be to have someone leading a community, so in fact I propose to search someone more with these kind of social skills that we miss too often with our managers at work. I think he or maybe better she

Sounds a bit like a job profile on one side, a mission impossible on the other side, but what I really would like to see finally is a group of people having fun together and (as a byproduct) a nice android app for piwigo...

As said, my time is limited, but if the surrounding fits, I will happily join!

ramack commented 6 years ago

@plegall any news? Any reactions? @jeff-amn what about you? Still interested in contributing?

jeff-amn commented 6 years ago

I am still interested in helping as time permits (which seems to be limited lately).

@plegall - what are your thoughts when you say "reproduce the iOS" app? Do you mean features look the same or try to port some of the backend code?

plegall commented 6 years ago

@ramack what you're discribing is impossible. Nobody will ever contribute on an opensource project like this one with such a list of requirements, trust me :-)

I can work on leading the "Piwigo on Android" project, setting the roadmap, communicating... but I can't code.

@jeff-amn "reproduce the iOS app" means we look at what Piwigo iOS app does and looks like, and we do the same for Android. There is no reason to reinvent the wheel, it's just a different environment to implement our features.

ramack commented 6 years ago

@plegall should I understand your willingness to lead the piwigo-android app as an acceptance of the challenge as I wrote it? ...

Jokes apart, I was somehow disappointed on how I - as a young and unexperienced newbie was handled in this project so far. I am also involved in other free software projects where we miss a community of active contributors, which is not always so much fun, so I'd hope it will get better and that's why I wrote down what I would wish for to become a motivated contributor. And I really believe, that motivation is a key to success in a free software project that is not a one-man show, if the leader shares this main goal and tries to "care" about the contributors then I am convinced that it can fly.

Let's come to some technical points:

So if it then happens to be similar as on iOS, perfect. If not? I wouldn't care too much and try to focus on that what the Android users want. I guess most of the users are either on iOS or Android but seldom both.

Philio commented 6 years ago

I've tried to put some serious time investment into this project on several occasions now, but sadly my workload on commercial projects just hasn't allowed me to make significant progress. The last round of updates were a significant refactor which now puts the codebase in line (for the most part, not the latest versions though) with what Google now call "Android Jetpack" so anyone with some experience of using Google's architectural design for Android (e.g. anyone doing commercial work on the Android platform should have) shouldn't have too much of a hard time picking things up and progressing further. I'm afraid I cannot commit to doing this unfortunately, mainly due to an already busy workload, but also that I'm just not really using my Piwigo at the moment as it doesn't really fit into my workflow as it once did, so I'm not as motivated as I was previously. I don't like to leave something I started unfinished, but time is the biggest issue here.

I don't think it would be a huge effort to take what is here and turn it into some kind of functioning app (at least with basic browse, upload functions). I agree with a lot of what @ramack is saying and to bring real value to Piwigo users I don't think just "copying" the iOS project would do that and that was never the vision I had for this either. For the best user experience you should be looking at what some of the best Android apps do and taking inspiration from there. I don't use the camera on my phone a huge amount but the Google Photos app in particular has some great functionality, it's easy to use and syncs everything to the cloud automatically. Automatic sync would be a fantastic feature to have, in my opinion.

Good luck to you all and if I have some free time to contribute again in the future I'll let you know. If anyone has any questions with what is currently in the repo I'll be happy to help.

jeff-amn commented 6 years ago

I was able to get the latest code to run last night. This is where I am at - I have a old hacked up version that I am able to download images from an album and display them on the screen (have a album number hard coded to do that). I have also been able to upload a file to Piwigo (again everything hard coded). Even though I have been programming for nearly 40 yrs I am really finding it hard to even figure out how to have a button click run some code - if it was c# I could have a cheap UI done in a day (maybe a little exaggerated). When I looked at it again last night I think I am getting close to figuring out how to use the Databinding - I see how it works for variables - just need to figure it out for a OnClick of the Image.

@Philio - would you be able to help in getting us over some of (what should be simple) hurdles - first would be the click of an album and displaying the individual images. Just a quick paragraph should be good.

@ramack - if I can get the individual images to display - would you be willing to work on the menu so we can get some sort of simple upload working - lets see if we can take some baby steps on this. And Thanks for being a contributor.

Philio commented 6 years ago

@jeff-amn

That should be very similar in behaviour to an album listing really, you'd be looking to create a new Activity or Fragment, call the right endpoint on the API and populate a RecyclerView with the data.

Philio commented 6 years ago

Actually it's probably a little more complicated than that once you leave the top level album view, as an album can contain sub-albums.

In the repository you would need to do something like:

return Observable.zip(getCategories(), getPhotos(), someFunctionToCombineTheTwoLists());

The simplest thing you could probably do is return a Pair<List<Category>, List<Photo>> (you can just use a method reference Pair::new) or perhaps they could have a common abstract class or interface and you could combine them into a single list with albums first (benefit being that you would not require any complex logic in your RecyclerView.Adapter).

In your RecyclerView.Adapter you can determine which layout to use in createViewHolder based on the viewType parameter (you would need to override getItemViewType to have a non-zero value for viewType) and show either an album or a photo using a different layout so that it's clear to the user.

ramack commented 6 years ago

@jeff-amn yes, I can do the menu and upload stuff. And I have a revolutionary idea: what do you think about removing all the databinding stuff? - I think it is a nice abstraction, and I agree, that it can give some benefits for testing, but nevertheless it is an abstraction, which finally increases the complexity and especially for newcomers it is hard to get used to and master it. So without an lead developer being strong with it and with the target to attract new contributors I propose to remove databindings, dagger, architectural lifecycle components, all the non-floss stuff and simplify to the max. I know, we will not the perfect design, but to be honest, my target is not to win a software engineering contest but to have a usable piwigo app.

@plegall what do you think? What kind of contributors could we expect? Advanced android developers with software engineering background, or rather day-to-day java hackers, you can contribute if it is straight forward code? Did you already write an announcement and even get feedback?

Philio commented 6 years ago

@ramack

The primary reason for using data binding isn't used for testability, rather to cut down on repetitive boilerplate code. There are alternatives, Kotlin probably being the nicest way to do it as it binds views automatically (learning Kotlin an obvious requirement), followed by Butterknife and then, God forbid, findViewById.

Things like the Dagger, the architecture components and a layered architecture help to provide things like testability and separation of concerns. Before many of these libraries existed, Android apps tended to contain a lot of large monolithic activities which were complex, hard to test and hard to maintain.

Rather than remove things that you perhaps don't fully understand yet, I would encourage you to poke around with Android Jetpack as the libraries provided here solve and simplify many of the problems and pain points that "we" (developers) have had with Android in the past. A good starting point would be the Sunflower app: https://github.com/googlesamples/android-sunflower

FWIW all libraries provided by Google, Square, Rx that are used in the project are open source and although you might be passionate about FOSS yourself, you need to consider your audience for this app and I'm pretty sure 99.99% of @plegall's users are going to downloading the app from the default app store on their phone - Google Play.

jeff-amn commented 6 years ago

I was able to take my code to download the images and integrate it into @Philio current code. When you click on an album it will display the images in an image fragment - hit the back button to get back to the album page. I took a screenshot and zipped the code here: https://1drv.ms/f/s!AsiyDqtD-E4xsm68xL9wUH71XURV

@Philio - your right - did not think about sub-albums. Also since I just copied the Album fragment over and I think I am getting the full image it takes a little bit of time to load images - now thinking that the first image page should be more of a mid-res and then being able to click an image goes to a single full res that is swipable left and right for the next and previous image. One other thing I notices was that scrolling the full album might not be the best way to navigate through the images of an album - probably want pages with x images per page that is swipable page to page.

@ramack - I had similar thoughts on simplifying it - but I think Phil is right - databinding does simplify the coding once familiar with it - I think I am starting to get the hang of it (thanks to youtube and google). Maybe we should start a "how to issue" and post examples or links that are relevant to the coding of this project. I can share links I have found if you would like me to.

ramack commented 6 years ago

No doubt about publishing the app also in Play store, but you statement 'all from google is open source' is just false. fabric crashlytics et al are closed source and even worse using proprietary services. In my eyes the complete point of a self hosted gallery becomes void if I use such libs in the app to access the pictures... Also we should not mix the question about who will install it from where and which used libraries and services are free (as in freedom, not only free of cost).

@jeff-amn can you push your code into a public accessible gitrepo instead of sharing a zip file?

Philio commented 6 years ago

@ramack We already discussed that at length so I think you know that I am referring to the Google Android libraries and not Fabric (which already has a flavour to exclude it from the build). Yes, Fabric isn't open source, it can easily be removed/replaced etc as it's about 1 line of code to include it and get all the great benefits of Crashlytics which have been a godsend on countless projects (probably why Google bought it). If you're looking to do something that is 100% open source, then you should perhaps look away from Android, which contains proprietary/closed source libraries as well.

ramack commented 6 years ago

@jeff-amn I tried you code and I really like it. It is not yet perfect, but it shows more than what ever was there. I think we really should proceed to get that code into the main repository.

@plegall how shall we proceed: Do you want to give @jeff-amn and / or me directly access to Piwigo/Piwigo-Android? Shall we start to work in a fork? What do you plan for publishing it? - I think it would be good to have a release in a beta track in google play, as soon as we

and for the organization of the remaining tasks, I recommend, that we create tickets for everything that comes to our mind what needs to be done and someone (@plegall ?) assigns them to the upcoming release. And we can use the "thump up/down" voting in the tickets to give a priority from our point of view. And I think it would be vise to assign developers to the tickets, to avoid double work, because there is nothing more frustrating than if you worked on a topic and someone else pushes and implementation before.

jeff-amn commented 6 years ago

Created a working repository for the code that I zipped - https://github.com/jeff-amn/Piwigo-Android-working

ramack commented 6 years ago

Thanks, that is already good, but even better would be, if you'd use the "fork" feature in github, to have a branch of the Piwigo/Piwigo-Android in your github account, which is "linked" to the original repository. Otherwise it will be hard to merge your changes into the main repository.

If you want I can guide you to reach that, but this might be better in 1:1 communication. Do you want to reach me out via email (activity-diary att rampro dot de). In the long run it might be a good idea to setup a chat (irc channel on freenode, a XMPP group or something similar - not whatsapp)

ramack commented 6 years ago

@wiwie what about you? These days there is again some flow - at least in the discussions. Do you see a chance to help with this app? We need everyone who is interested in getting a Piwigo app for android. So if you are interested in coding, translating, documenting, planning, leading the community, interacting with (potential) users, feel free to actualize your ideas...

plegall commented 6 years ago

@ramack and @jeff-amn I have sent you invites to join Piwigo organization on Github, so that you can have write access on this repository.

ramack commented 6 years ago

For sure we will never stop looking for contributors, but I will close this issue for now, as continuing to discuss here will probably not attract new contributors, while a first release usable for something will.

ramack commented 5 years ago

@jeff-amn @plegall @EddyLB I think some topics could be better discussed via email, chat or another communication system, instead of using only issues here on github. Do you have any proposal, or do you like to keep this "using-tickets-only-approach"?

@jeff-amn for example I really would like to understand why you don't use a fork of the main repository to publish your changes, and I'd like to help you with that, but this doesn't seem to be good to do here.