User story: I as a NextCloud user, want to use all NextCloud features on Android.
So downloading multiple apps is fine (and you got many: OCReader; Notes, NextCloud itself, …), installing them is fine, but afterwards we get some problems…
What I want to show is: Using multiple apps, which may be more or less maintained, which may be better in a security aspect or not, which may accidentally delete all your data and where each of them needs a login is (potentially) bad.
Even when all apps are open-source (which is not guaranteed as users might also use non-FLOSS apps) open-source does not equal to security. NextCloud should provide a secure platform, where third-parties can securely integrate their apps.
…is therefore to create an API as the title indicates. Allow apps to connect to the main NextCloud app, where they can request permissions etc. All traffic (and therefore the SSL/TLS things) would be handled by one app - NextCloud - where you can include all security features etc. You can more easily expand/change the NextCloud system, especially the authentication.
So how exactly could it be done? I've got two examples of other open source apps here:
Related: https://github.com/nextcloud/android/issues/626 (DavDroid)
CCing other app devs: @schaal (ocreader), @stefan-niedermann (nextcloud-notes), @bitfireAT @devvv4ever (DAVDroid), @nerzhul (Nextcloud SMS App), @David-Development (News-Android-App)
Others, who might be interested: @jancborchardt
Any app I forgot? Please comment and I'll add the maintainer here.
CCing @nerzhul (Nextcloud SMS App)
Also requested in https://github.com/schaal/ocreader/issues/45#issuecomment-287593441 by @schaal as "form of OAuth".
BTW other arguments for this thing:
Yup, it would indeed be awesome to fold the library of @David-Development into this main app so every other app can request permissions to the credentials and you have to then accept it in the Nextcloud app.
Can you read https://github.com/David-Development/ownCloud-Account-Importer/issues/3 and tell us if this fit your needs?
Yeah, this looks good for the authentication part. However, in this issue I deliberately proposed a "bigger" API, whcih also covers the network connections. (see "problems 2.2.")
Right now DAVdroid has the problem that latest Android throttles background services. Polling is not a good solution for mobile anyway. So the Nextcloud app should be able to notify other apps of events on the Nextcloud server (like changes in calendar etc).
@awesome-manuel What do you mean exactly with "throttles background services"?
DAVdroid has to be whitelisted to be not affected by battery optimization: https://www.davdroid.com/faq/automatic-synchronization-is-not-run-as-expected/
Ah, I see. However I wouldn't say it's a "DAVdroid problem", but just how things are working in Android: if you don't use Google's proprietary FCM services, you will be punished by battery saving. This happens for many apps, including DAVdroid, XMPP clients (Conversations, …), messengers (Threema), …
Of course CalDAV/CardDAV push would be cool, but even if an open standard would exist, implementing it would either require
But I guess this is off-topic here… if somebody is interested in more information/discussion, please use the DAVdroid forum :)
Nextcloud already uses FCM for the sync and the talk app. But of course other apps cannot include the FCM API key, so one of the Nextcloud apps has to mediate the notification.
There has been some development on the possibilities to implement a global authentication / secure networking problem for all apps. If you're interested, follow the discussion here: https://github.com/nextcloud/ownCloud-Account-Importer/issues/3
@jancborchardt @tobiasKaminsky @mario It would be great to see this feature in production sometime :D I'm still waiting for some feedback..
I am constantly keeping the PR up to dating hoping that @tobiasKaminsky will find the time to integrate and test it.
Most helpful comment
I am constantly keeping the PR up to dating hoping that @tobiasKaminsky will find the time to integrate and test it.