axiel7 / AniHyou-android

Another unofficial Android AniList client
https://axiel7.github.io/anihyou/
GNU General Public License v3.0
324 stars 6 forks source link

Airing notifications on exact time #10

Open brian6932 opened 1 year ago

brian6932 commented 1 year ago

Request (required) Particularly for airing, but other notification activity could be included in this as well. I get that there's no socket for this, so it won't be instant, but some polling interval should be fine.

axiel7 commented 1 year ago

I'll probably implement something similar to Tachiyomi update interval, so you could choose how often the app checks for new notifications (6h, 12h, 1 day, etc)

axiel7 commented 1 year ago

I shared a test build in the discord server with initial support for push notifications. If you want to early test join the server, or wait for the stable release

brian6932 commented 1 year ago

What channel would that be in? Nvm, I see it

brian6932 commented 1 year ago

I think ideally a similar implementation to https://github.com/zend10/AL-chan/commit/dc472a48e7b57414d8c93bd0f94d1dd63238ea5d should be used, so that the notif can be queued at the exact airing time.

axiel7 commented 1 year ago

I think ideally a similar implementation to zend10/AL-chan@dc472a4 should be used, so that the notif can be queued at the exact airing time.

That's an interesting approach, the problem is that for some anime the exact airing time is not always the same (see zom 100) so the app would notify incorrectly. Also the AlarmManager uses more battery so I want to avoid it.

But I'll see if I can improve the accuracy using a similar approach

akyraisconfused commented 5 months ago

i'd like to request not immediate notifs but shorter intervals for checking if there are new notifs. getting a push notification for an activity reply i got hours ago isn't great. other clients provide as little as 15 minutes so i believe it's possible.

brian6932 commented 5 months ago

I don't think low intervals make sense for a program like this. Your watching/planning list has set times. Those times can be checked even one time a day, and a push can be queued on their timestamps. It's not super efficient to constantly do a gql post request, deserialize, diff, then push, especially for your battery life.

axiel7 commented 5 months ago

I don't think low intervals make sense for a program like this

I agree, but the default interval is 24 hours, so if the user wants to change it to a shorter interval then go for it

brian6932 commented 5 months ago

Yes fair, for social aspects (likes, comments, forum posts, etc) of AniList it makes perfect sense. I was just trying to say it's not a substitute for this issue.

akyraisconfused commented 5 months ago

i just declded to mention it under this issue because the same setting applies to both airing and social notifications i believe. i might've caused a little confusion by saying "not immediate notifications", sorry :P though i find airing notifications even 15 mins late to be useful enough, especially if you're sailing the seven seas and already have to wait about an hour after release lol