jasoncheng / dica

This is a very simple Friendica android client, wrote by Android Kotlin
GNU General Public License v3.0
15 stars 2 forks source link

[feature request] Notifications in Android #84

Closed ghost closed 5 years ago

ghost commented 5 years ago

It would be nice if there was a notification in Android for comments on their own posts or posts where you have commented yourself.

jasoncheng commented 5 years ago

i desire this function for a long time, currently, only two way can did this:

both are not a good solution

jasoncheng commented 5 years ago

@copiis what you think? Should i implement one of them?

ghost commented 5 years ago

I would suggest the first option with a query interval of 5, 10 or 15 minutes. I do not quite understand the second one. It should be valid anyway only for DiCa. What do you not like about the two solutions?

jasoncheng commented 5 years ago

For push notification should be real push from server side to Google/Apple cloud message server and then deliver to client ( not keep polling data per 5 mins from your mobile device); but enable to did this, it's should be a long way to go, maybe no way .....lol.... :)

1. what i think is, avoid use any background service on android, some background service is annoying, waste usage and power and network bandwidth.

take this for example: https://meld.de/api/friendica/notifications (63kb data~)

maybe i check for 3 hours 36 times(5min/sec), same data response, but not new one (2268kb waste), maybe later Friendica API support (sinceId) would be solve bandwidth and loading issue.

2. the second one, can really push notification each other, it's use system existing connection, no background service require; but require use centralize push service(google firebase service). and only limit to use who use DiCa.

Anyway, currently look like [1.] is better; i'll did some research on this : https://developer.android.com/topic/performance/scheduling

jasoncheng commented 5 years ago

status update: Maybe find API issue , even i have seen, API still response (seen = 0), website already seen.

After a while, it's been seen now

2018-12-14 1 47 17
jasoncheng commented 5 years ago

status update: almost ready, final testing