Status-react: No push Notifications w/o Google Play Services

Created on 22 Jul 2018  Â·  23Comments  Â·  Source: status-im/status-react

User Story

As a user of Android AOSP / LineageOS, I would like for Status to be as functional with the Google Play services, as it is without this centralised component.

Description

chat

Most helpful comment

This is important, bot.

All 23 comments

@GustavMarwin can you provide more info and describe the exact scenario when notification is not received, please? For example: user A sends user B message "hi" in 1:1 chat when user B has app running on background. User A has B in Contacts list, user B has A in Contacts list. For both users app runs on Galaxy S7, Android 7.0. App version 0.9.22

@annadanchenko : so I think there's no need to go deep into troubleshooting to understand that at this point in time, Status notifications cannot work properly outside of the Google Play ecosystem due to the fact that Status will quickly get suspended by Android and will have no way to check for new messages nor to display notifications.

Signal solves that by keeping a notification displayed at all times, it's quite efficient apparently.

Now I'm happy to do testings for you on an Android without GCM (like AOSP or LineageOS) and report any detail you need. But again at this point, it just can't work for the reasons I've mentioned.

This is not an easy problem to address, considering how much work goes into making a solution that is reliable and at the same time, battery and network topology-friendly. This is one of the reasons why the Push Notifications v2 swarm still does not address it directly, merely taking the opportunity to allow for future extensibility in terms of PN providers. As a result, I haven't yet done much work to explore possible solutions, but here are some alternatives to GCM that I'm aware of (any additions to this list are welcome):

@GustavMarwin as you rightly mention, it is possible to have a persistent notification to keep the application alive and allow polling, although it is less efficient for every app to do this in parallel, rather than grouping all those needs into something like GCM and having a single TCP connection serving everyone. Nonetheless, it could serve as a first stepping stone towards a more mature and resource-friendly solution.

The way we plan to allow for extensibility of PN providers in PN v2 is by relying on gorush and contributing to the project an additional PN platform (currently supports GCM and APN).

Stack Overflow
I recently learned about the ability of iPhone apps to receive nearly instantaneous notifications to apps notifications to apps. This is provided in the form of push notifications, a bespoke proto...

@PombeirP : I'm so, so glad to see you already have a bit of a plan for this.

So as mentioned, Signal uses this persistent notification method and it works ok in the context of Android without Google services. But most importantly Signal has some major issues when used without those Google services, issues where a fix exist but the lead maintainer is ignoring those for an unknown reason [1]. Point being, there's currently no properly secure and private messenger in a functional state on Android devices without Google services today, but there are definitely people in need of such service [2-4]. Hence my hope for Status to fill that void hopefully soon.

[1] https://github.com/signalapp/Signal-Android/issues/7638
[2] https://drewdevault.com/2018/08/08/Signal.html

[3] https://old.reddit.com/r/signal/comments/95wfe2/i_dont_trust_signal/
[4] https://old.reddit.com/r/privacytoolsIO/comments/95y6ct/drew_devault_on_why_he_doesnt_trust_signal/

Drew DeVault’s Blog
Occasionally when Signal is in the press and getting a lot of favorable discussion, I feel the need to step into various forums, IRC channels, and so on, and explain why I don’t trust Signal. Let’s do a blog post instead.
reddit
0 points and 12 comments so far on reddit
reddit
45 points and 29 comments so far on reddit

@PombeirP Do you need a hand with this? I'd be happy to fund a Gitcoin issue on this matter that I consider particularly important.

I suspect the problem is somewhere else. I tried to find out what education does the moxi have. What schools did he graduate from? What high school and what university/polytechnic? Wikipedia and google in general are silent about his education but he calls himself a cryptographer or researcher. One could be tricked he is mathematician or software engineer. Maybe he simply does not understand what do you talk about? He knows something as a self taught person in one particular branch but university education gives not only education but also a 360 degrees way of thinking. Maybe he is stubborn because he is uneducated.

for example Bruce Schneier's CV : (Wikipedia)
"Bruce Schneier is the son of Martin Schneier, a Brooklyn Supreme Court judge. He grew up in Flatbush, attending P.S. 139 and Hunter High School.[6] After receiving a physics bachelor's degree from the University of Rochester in 1984,[7] he went to American University in Washington, D.C. and got his master's degree in computer science in 1988.[8] He was awarded an honorary Ph.D from the University of Westminster in London, England in November 2011. The award was made by the Department of Electronics and Computer Science in recognition of Schneier's 'hard work and contribution to industry and public life'."

@GustavMarwin thank you, I think the issue right now is prioritization. Although this is important work, right now there is work going on that supersedes this, such as implementing Perfect Forward Secrecy.

@PombeirP : Absolutely, I understand and have no doubt the priorities you set are what is best for this project. I just wanted to express that I am willing to financially support the project (as far as an individual contribution can be expected) should you feel that it would make a positive difference, very much in the same spirit as Augur did. Thank you for the awesome work you do.

Thanks @GustavMarwin, and kudos for being such a stellar supporter!

Hey @PombeirP - It would seem Conversations.im has solved this problem neatly and efficiently, what do you think of this approach? https://conversations.im/#optimizations - It's not perfect, but it looks pretty good.

An open source instant messaging client. Easy to use, reliable, battery friendly. With built-in support for e2e encryption, group chats and media transfer.

Hi @GustavMarwin, yeah, of course it is possible, but it's always going to require a separate persistent connection that's not reused by other apps (like GCM) and will require quite a bit of work to optimize so that we don't consume too much power/data on mobile devices, while at the same time ensuring we do it in a decentralized way.

There's currently no perfect solution so I'll keep sharing devs stories of those who are trying to tackle this problem with different approaches if that's useful to you / the project?

The most recent one is Tutanota, it's a good read too: https://f-droid.org/en/2018/09/03/replacing-gcm-in-tutanota.html

I don't use Tutanota (but starting to consider it now), however I do use Conversations.im which, like them, does not rely on GCM; I don't know if the Conversation app strategy is easily replicable but again although not the idea design we both would like to see, it works great and my battery is virtually unaffected. I wonder but don't pretend to have the answer, if this would be a good short/mid-term solution until a proper open-source, decentralised, push notification system comes to life.

As mentioned in This Week In F-Droid 17, Tutanota is now on F-Droid.In this special post Ivan fromTutanota, tells us the story.Hi, I’m Ivan and I am developi...

Hey @GustavMarwin, for sure all the articles you manage to send will become food for thought when the time comes to implement this, so thank you for sending them our way, it will only help make the outcome better!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed. Please re-open if this issue is important to you.

This is important, bot.

Hey @PombeirP ! Any updates on this by any chance?
Today the situation is very similar to what it was back when this issue was created: there's only one messaging app that works well on LineageOS w/o Google Play and it's Conversations.im - Not only that, it's also very efficient on resources being used.
Edit: scratch that, there's also Riot.im, although it uses a fair bit more battery.

Hi @GustavMarwin ! I'm afraid we haven't started it yet, there are still some building blocks we are in the process of putting in place before attacking this.

This could maybe be used: https://gotify.net/

@Serhy this seems like one to test with the emulator without Google Play Services

I've tested latest develop build (19th of May) on Genymotion emulator: Galaxy S7 with Android 7.1 And there are no GooglePlay Services installed.

Notifications are working for me, pop-up about new message received in 1-1 chat appears like on real devices with gplay service installed.

Thanks @Serhy ! Closing this. We can reopen if we get bug reports from real devices w/o Google Play services

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Serhy picture Serhy  Â·  3Comments

annadanchenko picture annadanchenko  Â·  4Comments

rachelhamlin picture rachelhamlin  Â·  3Comments

asemiankevich picture asemiankevich  Â·  4Comments

errorists picture errorists  Â·  3Comments