-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
No notifications to Android whitelabel app #4997
Comments
Additionally, I get notifications when I start campaigns from Firebase Console. This means that I have an app with google-services.json correctly intalled on my device, right!? |
Yes, most likely the error is in the configuration in the settings panel and not really the app itself. |
Hi Gleidson, thank you for you suggestion. You mean Settings panel from within Rocket Chat App, right!? Maybe you are right, that's why I want to validate where the values to GCM fields come from. What else would impact Android notifications? Thanks! |
From logs I see the following entries: Is it information only or related to missing notifications? |
@diegolmello can help you better |
The android_channel_id is just a warning.
How did you test this? When the app logs in, it sends the device's push token to the backend. Also note that every time you change something on Push section on Admin, you'll have to restart the server. If it doesn't work, make sure to debug the push logic on backend to understand what's happening. |
Hello Diego, thank you for your feedback! So the channel_id message is just a warning, ok no more concerns about that. Well, about test scenario, it was pretty trivial, I've downloaded single-server branch from git, then I've made changes to customize it to my environment and finally I've compiled it using yarn. Actually, I've made one more change to package.json file, I've added a new line to "scripts" section to use experimentalPlayRelease variant: "android-whitelabel-release": "npx react-native run-android --main-activity chat.rocket.reactnative.MainActivity --variant=experimentalPlayRelease --appId", So I've run yarn android-whitelabel-release instead of what is in the documentation. When configuring Push at Rocket Chat WebUI, I've used the API KEY from google-services,json since I kept Cloud Messaging API (Legacy) disabled at Firebase Console. With all that set, I've published a new release to Google Play Console to Internal Testers, so during tests I've got that message from RC Logs. In order to generate the bundle from Android Studio I've used Build > Generate Signed Bundle / APK and in the prompt screen I've used keystore file, alias and password as previously created according to documentation. If I'm missing any information please let me know. |
This could be the issue. |
Ow, I forgot to say, I've created an out of the app notification campaign on Firebase Console and my Rocket Chat Whitelabeled App was able to receive it successfully. Does that mean that the tunnel from FB to app is ok? |
Yes, because it's simpler than that. |
Diego, your first comment was the light to figure out what was the problem. I was getting the GCM API Key from wrong place. RC documentation is fine, for some how we changed it and, as soon as we corrected it, notifications started popping out. Thanks for your help. |
Hi, rochafabrizio, can you show right place of getting the GCM API Key? |
@rochafabrizio @diegolmello i followed the same steps. i enabled the Cloud Messaging API (Legacy) and copied the server key and sender id and pasted it in GCM API Key and GCM Project Number (in settings) respectively. The notifications still didnt work. any idea what can be the possible problem? |
Description:
I have downloaded Rocket Chat single-server branch (version 4.36.0), then I followed Android App White Labelling (https://developer.rocket.chat/mobile-app/mobile-app-white-labelling/android-app-white-labelling).
Environment Information:
Steps to reproduce:
I have created a new project on Firebase, added a new Android application and downloaded google-services.json file.
I have downloaded and configured Rocket Chat ReactNative single-server branch, version 4.36.0, for white labeling as document (https://developer.rocket.chat/mobile-app/mobile-app-white-labelling/android-app-white-labelling).
At Rocket Chat server web UI, on Administration > Settings > Push, I have turned off "Enable Gateway", I kept "Production" on and added "GCM API Key" and "GCM Project Number".
Note that for "GCM API Key" I have copied the value from google-service.json file under api_key current_key value and for "GCM Project Number" I have copied from Firebase "Sender ID".
Also, I have changed "server" key from app.json file to match our domain address.
Expected behavior:
Notification should be received on mobiles.
Actual behavior:
No notifications are presented.
Additional context:
The text was updated successfully, but these errors were encountered: