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

Native smartphone apps #12

Closed
lastzero opened this issue Oct 8, 2018 · 33 comments
Closed

Native smartphone apps #12

lastzero opened this issue Oct 8, 2018 · 33 comments
Labels
idea Feedback wanted / feature request released Available in the stable release

Comments

@lastzero
Copy link
Member

lastzero commented Oct 8, 2018

For Android and iOS. Interface should be similar to the Web UI (Material Design).

Main reason why this is important: Automatic upload / sync of photos stored on the devices, especially if PhotoPrism is hosted at home (devices need to be in the same Wifi network).

Maybe use NativeScript? https://www.nativescript.org/

@lastzero lastzero added the idea Feedback wanted / feature request label Oct 8, 2018
@lastzero lastzero added this to To do in Product Development & UX via automation Oct 8, 2018
@danieldaeschle
Copy link

Maybe use flutter :)
Easy Material Design built in!

@lastzero lastzero added help wanted Well suited for external contributors! good first issue labels Oct 15, 2018
@lastzero
Copy link
Member Author

Flutter is on the watchlist. Actually tried to build an app with https://godoc.org/golang.org/x/mobile & flutter, but didn't work due to compile / run errors.

Would be amazing if somebody with experience in mobile app development could help us!

@danieldaeschle
Copy link

I've never saw that golang has the ability to create mobile apps 😁

You easly can use flutter without go...

@lastzero
Copy link
Member Author

It was an experiment. The whole project is an experiment. Not satisfied with the status quo.

@Kerumen
Copy link

Kerumen commented Oct 15, 2018

@lastzero To be honest, this seems a bit huge for a "good first issue" 😄

@lastzero
Copy link
Member Author

It's actually a first idea ;) It's good because there is nothing yet, a green field to play on.

@Kerumen
Copy link

Kerumen commented Oct 15, 2018

Agree with you on that part. However, you have to know very well the API imo.

@lastzero
Copy link
Member Author

If you already know how to build it, yes. I don't have an idea yet what technology to use. It should be simple and good to maintain. Not like 10 wrapped containers with hipster tech. Working with Web technologies might be great because of code reuse, but then it's probably hipster tech. Open to suggestions.

@Stmol
Copy link

Stmol commented Oct 17, 2018

Ok, looks like you've got three options:

  1. ReactNative cross-platform, it uses JS under the hood, and built on top of components paradigm (same like Vue). Unlike Flutter, RN has a huge library of existing components for every taste.

  2. Flutter cross-platform, it uses own unpopular language Dart by Google, and also, in a nutshell, for building apps it has components similar to React (it's calling Widgets). Young framework but rapidly gaining popularity, and much inferior in the number of existing production-ready widgets.

  3. Native language and platform specific SDK. Swift for iOS and Kotlin for Android. Because simple and good to maintain is not about Objective-c and Java.

Also, you have tons of options like NativeScript or Vue Native. But trust me, I had experience with React Native and every time you want to do something more complex than "Hello World" tutorial you get a lot of troubles. So using all this SOMETHING-NATIVE promises big trouble in deep dive.

Conclusion. If you want to be a hipster and you believe in the idea of code reuse, take ReactNative. It has a good community and you can expect a ton of pull requests.

If you want to fun and learning something new take Flutter. This will be a great challenge. BTW, Dart is quite simple and I liked it as an alternative for JS and TS.

But if you are good guys and have a lot of free time at your disposal, use Swift and Kotlin. This will be the best solution for any project that harder than "Hello World" tutorial. Swift and Kotlin are modern languages that are rapidly developing and allow you to do anything with extraordinary ease.

Anyway, I am glad to help you with any of this three cases 😌

@danieldaeschle
Copy link

I'm also could help with thesre three. But react native i never used really :D

@lastzero
Copy link
Member Author

What about uploading in the background and accessing photo meta data? Is that possible with reactnative or flutter?

@danieldaeschle
Copy link

You still have to write native services in this case. Flutter and React Native are only for views.

@lastzero
Copy link
Member Author

I thought maybe this is so common that there are ready to use APIs / components for this. Sounds like a native approach is unavoidable anyways, best we can do is mix native code with JS? Not sure if that makes it simpler to maintain...

@danieldaeschle
Copy link

In addition, the native google libraries have better design libraries uncluded or provided from google. React Native doesn't really have a good Material Design library. Only flutter has a good design library which works really good.

Flutter has the advantage to provide good design and transition on any smartphone. If you want to do the same with native you maybe get confronted with devices which crashes on special configurations... This can be vers annoying.

@lastzero
Copy link
Member Author

@danieldaeschle When doing the UI with Flutter, the Dart code can be reused for an iOS app, the UI would look almost the same on both platforms and only platform specific code needs to be written in Swift or Kotlin - did I get this right?

@danieldaeschle
Copy link

Yes, exactly

@lastzero
Copy link
Member Author

Sounds like a plan. Does it make sense to create a photoprism-mobile repo for that, containing shared Dart/Flutter code in one directory and platform-specific code for iOS and Android in two other directories?

@danieldaeschle
Copy link

A flutter project already provides this structure.

@lastzero
Copy link
Member Author

@Stmol
Copy link

Stmol commented Oct 18, 2018

Sounds like a plan. Does it make sense to create a photoprism-mobile repo for that, containing shared Dart/Flutter code in one directory and platform-specific code for iOS and Android in two other directories?

It doesn't. First things first, you should google about features like accessing photo meta data, parallel background uploading (multiple objects), is it easy or not to work with photo editing, list component perfomance with a huge count of image objects and etc.

The trivial details like UI kit or project architecture are minor points. Any of the technology we discussed in this topic do it well.

@lastzero
Copy link
Member Author

Ideally somebody with experience can help us here... I probably won't have time to seriously experiment with those technologies in depth before next year. At best I can do a simple feasibility study.

@danieldaeschle
Copy link

With flutter you can very easly do a lazy loading view. Editing photos should be possible with Dart.
Parallel uplaoding should be made with kotlin/swift

@santoshgistto
Copy link

@lastzero i am not able to find rest api doc, is there any ?

lastzero added a commit that referenced this issue Nov 6, 2018
Hard to test locally as godoc -http ":80" doesn't seem to work outside the GOPATH
@lastzero
Copy link
Member Author

lastzero commented Nov 6, 2018

@santoshgistto As a first step, I just added a page to our Wiki and added routes & parameters to the inline docs:

https://godoc.org/github.com/photoprism/photoprism/internal/api

It was actually a bit annoying since my code is outside the GOPATH and the godoc server doesn't seem to work with that yet, so I had to push the changes to test them...

@santoshgistto
Copy link

santoshgistto commented Nov 6, 2018

Thanks @lastzero for reply.
i tested the api

http://localhost:2342/api/v1/photos?count=1
The response missing thumbnail url
[{"ID":19,"CreatedAt":"2018-11-06T07:31:22Z","UpdatedAt":"2018-11-06T07:31:22Z","DeletedAt":"0001-01-01T00:00:00Z","TakenAt":"2018-08-11T10:51:32Z","PhotoTitle":"Handkerchief / 2018","PhotoDescription":"","PhotoArtist":"","PhotoKeywords":"","PhotoColors":"chocolate, coral, darkorange, gray, grey, lightslategray, lightslategrey, orangered, slategray, slategrey, tomato","PhotoVibrantColor":"#f76f1f","PhotoMutedColor":"#925b97","PhotoCanonicalName":"20180811_105132_2FFDA64D425B","PhotoLat":0,"PhotoLong":0,"PhotoFavorite":false,"CameraID":2,"CameraModel":"Unknown","CameraMake":"","LensID":3,"LensModel":"Unknown","LensMake":"","CountryID":"","CountryName":"","LocationID":0,"LocDisplayName":"","LocName":"","LocCity":"","LocPostcode":"","LocCounty":"","LocState":"","LocCountry":"","LocCountryCode":"","LocCategory":"","LocType":"","FileID":19,"FilePrimary":true,"FileMissing":false,"FileName":"2018/08/20180811_105132_2FFDA64D425B.jpg","FileHash":"2ffda64d425b0f9ca49318bc0b951d1a7c081266","FilePerceptualHash":"adb5","FileType":"jpg","FileMime":"image/jpeg","FileWidth":564,"FileHeight":414,"FileOrientation":1,"FileAspectRatio":1.36,"Tags":"handkerchief"}]

Are we need request separately for thumbnails ?

http://localhost:2342/api/v1/thumbnails/square/500/df54169be1f0c93805dccc82b753153c30d1c1c0

@lastzero
Copy link
Member Author

lastzero commented Nov 6, 2018

Thumbnails are created dynamically depending on the parameters like size and format, there is not a single constant URL. We could add a default / example thumbnail URL to the search result if this helps?

@santoshgistto
Copy link

Thanks @lastzero it helped.
i don't see more api like getting albums and tags details etc.
i believe still in under development.

@lastzero
Copy link
Member Author

lastzero commented Nov 6, 2018

Yes, currently busy with documenting etc - adding new features / apis when that is done

@santoshgistto
Copy link

ok cool, currently i am also looking into flutter. i will try to build the POC App using existing api.

Thanks,

@lastzero
Copy link
Member Author

lastzero commented Nov 6, 2018

@santoshgistto You are welcome to add yourself to our contributors list:

https://github.com/photoprism/photoprism/wiki/Contributors

@lastzero
Copy link
Member Author

lastzero commented Nov 12, 2018

@santoshgistto Put all relevant information including links to example apps here: https://github.com/photoprism/photoprism/wiki/Mobile-Apps

@lastzero lastzero added help wanted Well suited for external contributors! and removed help wanted Well suited for external contributors! good first issue labels Nov 13, 2018
@jantznick
Copy link

I've used react-native some and think it would be good for views, additionally it seems easy to hook it into native app code. Really it all depends what the main goal is?
For instance, just creating something that can display photos would be a great first step and enough to get people interested in using photoprism, then down the road more features could be added(uploading and whatever else you want)

@lastzero
Copy link
Member Author

lastzero commented Jan 6, 2020

Work in progress, see https://github.com/photoprism/photoprism-mobile

I'll close this here.

@lastzero lastzero closed this as completed Jan 6, 2020
@lastzero lastzero added released Available in the stable release and removed help wanted Well suited for external contributors! labels Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Feedback wanted / feature request released Available in the stable release
Projects
No open projects
Development

No branches or pull requests

7 participants