Rocket.Chat.Android icon indicating copy to clipboard operation
Rocket.Chat.Android copied to clipboard

No notifications on Rocket.chat+ Android

Open mhham opened this issue 9 years ago • 66 comments

Your Rocket.Chat.Android version: 1.0.8

No notifications at all on several devices (Lg G4, Honor 5C, Oneplus 1)

mhham avatar Apr 11 '17 11:04 mhham

I have the same issue (Galaxy S6 on Nougat) as do several other people at my organization.

I'm on 1.0.8 and have already tried clearing app data and reinstalling, neither of which have fixed it

reffu42 avatar Apr 14 '17 17:04 reffu42

@mhham @reffu42 Did you guys tried the test push (on the administration menu)?

Could you to that and tell me the results?

Are you guys using our gateway?

laggedHero avatar Apr 18 '17 16:04 laggedHero

I am using the Rocketchat+ client (native Android, not the webview wrapper), with the demo.rocket.chat server.

mhham avatar Apr 19 '17 09:04 mhham

Still no news on the issue

mhham avatar Apr 26 '17 12:04 mhham

I have same issue and notification not working for me on an Android 7.0.0 mobile phone. (LG K10 2017)

cyclops24 avatar May 02 '17 06:05 cyclops24

Please goto your push settings on your server and ensure you are using our push gateway as requested by @laggedHero above :top:

This is important for debugging.

Also can close the app on your phone and desktop then login with another user and see if it shows your users status as green. And let us know :+1:

geekgonecrazy avatar May 02 '17 17:05 geekgonecrazy

@cyclops24 @mhham Is this issue still happening?

rafaelks avatar May 12 '17 10:05 rafaelks

@rafaelks Hello! I can to confirm that this problem still happening... I'm use https://gateway.rocket.chat At the server log found next message: Push: send message "@MYUSERNAME" via query { userId: 'eHhuF1m99baHRDjxBg' }

sttyru avatar May 12 '17 14:05 sttyru

@sttyru Does it have some error information? Does it work on other devices? What's your server version?

rafaelks avatar May 15 '17 11:05 rafaelks

After debugging the code, I found that if you use default gateway: https://gateway.rocket.chat when getting public-settings from your server, Push_gcm_project_number(GCM SenderId) will return null. So you can't receive notification from your device. I have some solution for this:

  1. You can use your own gateway by creating on firebase and pass your "GCM API Key" and "GCM Project Number" in settings/push.
  2. Set default GCM Sender Id in code. It's will be used if the Push_gcm_project_number from the server is null.

congnt24 avatar May 17 '17 05:05 congnt24

@congnt24 are you getting push notifications with our rocketchat+ app in the store or are you compiling the app your self?

If you are compiling your self then yes you absolutely have to use your own credentials.

But if you are using ours to my knowledge you will have to use our gateway.

geekgonecrazy avatar May 17 '17 07:05 geekgonecrazy

@geekgonecrazy I using rocketchat+ app in the store, it works with both, my own credentials and default gateway. then I am compiling for myself and only receive notification if I use default gateway. So, I think other people build their own app but they use default gateway, the Sender ID will null and they can't receive notification.

congnt24 avatar May 17 '17 07:05 congnt24

@congnt24 If you're compiling the app yourself, you'll need to use your own credentials on the server. If you're using the App Store version of the app, you can use our gateway to send the notifications.

rafaelks avatar May 17 '17 13:05 rafaelks

It's not that you CAN use the R.C. gateway when the app isn't self-compiled, you must. I think that gets lost on people. The public app is simply built with the gateway's credentials, just like the cordova version.

I tested the Play store version against my own server recently and push works, btw.

xenithorb avatar Jun 22 '17 12:06 xenithorb

Yes exactly! If you use our published apps you must use the gateway for notifications. If you compile your own.. you cannot use the gateway for notifications.

geekgonecrazy avatar Jun 22 '17 15:06 geekgonecrazy

@geekgonecrazy I'm plotting a doc patch on this subject. Is the following true?

  • If you use official RC app, you must use the official RC gateway.
  • If you fork, compile, and release your own RC app, you must do one of the following:
    • Set up your own gateway (if your app may connect to different RC servers).
    • Not use a gateway at all (if your app is only for internal use and only connects to a specific RC instance). In this case you need to install certificates on your RC instance.

antgel avatar Jul 14 '17 20:07 antgel

That appears to be correct!

geekgonecrazy avatar Jul 14 '17 21:07 geekgonecrazy

@antgel Also important to mention that at the point where they desire to compile their own apps and distribute them, that would be when they start getting their own API keys and such. (As a process of modifying the app to distribute, and also adding those credentials to the server)

xenithorb avatar Jul 14 '17 21:07 xenithorb

@xenithorb Just when I thought I'd grokked it... So, you only need your own API key (I'm talking GCM, I don't know about APN) when you compile your own app? Does this mean that the GCM API Key and GCM Project Number fields are meaningless when using the official RC app?

antgel avatar Jul 14 '17 22:07 antgel

@antgel That is correct

xenithorb avatar Jul 15 '17 17:07 xenithorb