0xf104a / NextcloudServices

Android app to send notifications from Nextcloud without using GCM(Google cloud messaging)
GNU General Public License v3.0
65 stars 11 forks source link

Some questions and suggestions #2

Closed accountForIssues closed 2 years ago

accountForIssues commented 3 years ago

Hey, I just saw your project on F-droid and was happy to see an alternative to the NC's default dependency on FCM.

Am I correct to guess that you currently poll every few seconds to fetch notifications ? It would be nice to know the average battery consumption on a typical day.

How does your app deal with connection breakages;

I currently use this developed by @ASerbinski. It uses server side events instead of polling. It's a bit more advanced to setup but barely uses any battery (like <1% per day) and I receive notifications almost instantly with no delay.

Some suggestions:

0xf104a commented 3 years ago

Hello Yes, the app polls every 3 seconds notifications(I am planning to do this parameter user-adjustable in future) Currently app handles all exceptions occured while polling, so it just logs all network failures as well as any bad responses. In next release(currently this changes are staged locally) there would be also implemented connectivity check which uses Android API and if there is no network connection available the service won't do any requests(so it will handle turned off wifi/data). As for battery usage: on my device it uses about 5-7%(not sure whether settings meant 5-7% relative to all other apps, or relative to fully charged battery), but I have unoptimized debug build installed, so in releases which are built by F-Droid battery usage should be less. Also, thank you very much for your suggestions. I would definetely implement them in future, but first of all I need to fix bugs :)

0xf104a commented 3 years ago

Features to implement:

ASerbinski commented 3 years ago

I tend to think that anybody who is likely to want to use this software will also definitely be using the main nextcloud application. That being the case, you should NOT be implementing anything with respect to Android accounts api, rather instead you should use Nextcloud's SSO and process everything using Nextcloud API, otherwise you are definitely doing things the hard way.

The way the authentication process works using SSO is such that on application launch, if an account has not been added to YOUR application already, it would call the Nextcloud SSO API, which would present a list of nextcloud accounts that have been configured on the device. User clicks the desired account, it prompts for confirmation, and you're done.

https://github.com/nextcloud/Android-SingleSignOn

0xf104a commented 3 years ago

Yes, I completely agree with you. But I thought that the SSO provided by Android itself(just haven't read the docs yet), so this why I wrote about Android API. Thank you for explanation, by the way :)

sunjam commented 3 years ago

I see nextcloud login preliminary support listed on beta 1.10 and cannot find how to test it yet

0xf104a commented 3 years ago

You need to get the latest beta(i.e. 1.0-beta10) installed. Since F-Droid build takes from 3 days to a week, you should take this apk from releases page. To install it you will need to delete previous version(since it is signed by F-Droid key, warning: this will reset all in-app settings) and then after installing 1.0-beta10 from apk file you can open the app and press "Log in via Nextcloud app" and app should show Nextcloud's account selection dialog.
NOTICE: You will also lose ability to update via F-Droid by the same reason: different signing key.
Another way to test without losing app prefeences and ability to update is using work profile(e.g. Shelter), so you can install Nextcloud Files and the latest beta in work profile and test it there

sunjam commented 3 years ago

F-Droid release of 1.10 beta is available as of today. Thank you.

0xf104a commented 2 years ago

All features which were requested in this issue were implemented as per 1.0-beta12, so I am closing this issue