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

Push / native / system notifications #871

Open
janpio opened this issue Sep 7, 2017 · 3 comments
Open

Push / native / system notifications #871

janpio opened this issue Sep 7, 2017 · 3 comments
Labels

Comments

@janpio
Copy link
Contributor

janpio commented Sep 7, 2017

The topic "native Android push notifications" popped up in several issues in the last few days: e.g. #870, #865, #725, #7, #858, #79, #259.

I posted my thoughts in several of them, but as this tends to hijack the actual feature discussion, I wanted to centralize that information in one place:

Native push notifications would certainly be a nice technical feature and could greatly enhance some functionality. But they pose some very serious challanges:

  1. Server Side Component
    Unfortunately, native notifications require a server side component that a) either polls for new "messages" on Mediawiki or b) is informed about new "messages" by MediaWiki. It also requires a "database" of "push tokens" that are connected to user accounts (unless this can somehow be added to the mediawiki user account) and are used by the serer component to send the notification to the actual device. (It gets more complicated when a user has multiple devices.)

  2. Google Play Services
    As far as I know the only battery friendly way to support push notifications on Android is using GCM/FCM which is implemented via Google Play Services on the device. From what I read in the past, this might be a problem for the project because of licence / Open Source rules reasons.

Does one of the official Wikipedia apps have push notifications? I would like to look into how they implemented this...

Alternatives to proper push notifications include a) local notifications (where the app or a service trigger a notification to be generated themselves, looks identical to push but happens all on the device) or a b) "pull notification" system which works similar to e.g. the Facebook feed where you have to refresh a list of messages to get new messages (or which gets refreshed automatically when the app is started or running).

@misaochan
Copy link
Member

Thanks for creating this thread, @janpio - definitely useful to have a centralized issue for discussing this.

@Bluesir9
Copy link
Contributor

We recently moved away from FCM for a small set of push "notifications" at my workplace. For this we used Socket.IO to maintain an active socket connection in the background between the client and the server. And while the system works just fine we haven't really been able to match the delivery success rate that we get on FCM, primarily cause keeping the background service running all the time to maintain the socket connection active is a major problem in itself.

That said, I just learned that the Wikipedia Android app is open source as well! I just had a quick look into their repository and it looks like they are using some kind of polling mechanism, although I haven't made enough sense of it yet. We could get some learnings from that and use them here.

@sivaraam
Copy link
Member

Does one of the official Wikipedia apps have push notifications? I would like to look into how they implemented this..

I guess you missed my comment on #725.

Actually the Wikipedia android app uses notifications to notify the user about a reverted edit (sounds similar to "proposed deletion", doesn't it?). So I thought you could do something similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants