Push notifications not working on White-Label Rocket Chat App - android

So I am compiling Rocket Chat to use my own Firebase server so I can server notifications without worrying about hitting the notification limit. I've followed the steps here and gotten a working Experimental version of the app on Android, but I can't seem to get the notifications to work. Checking Firebase shows no users of my app, though sometimes it will register a single user but that's it. I've got to be missing something simple, but I can't figure out what. Any help or tips would be greatly appreciated! Thanks.
If you need any more information just let me know.\
UPDATE: I can send test notifications from Firebase and they show up on the device, however they are not marked as read in Firebase when clicked. It seems as if notifications work from Firebase, but it has no way to communicate back to Firebase.
FINAL UPDATE: It turns out that Rocket Chat server needs the legacy version of the FCM keys. By replacing the existing google-services.json file with the one provided by Firebase and following the instructions to get the legacy keys caused notifications to work. Hopefully someone else can benefit from this insight.

FINAL UPDATE: It turns out that Rocket Chat server needs the legacy version of the FCM keys. By replacing the existing google-services.json file with the one provided by Firebase and following the instructions to get the legacy keys caused notifications to work. Hopefully someone else can benefit from this insight.

Related

Android Java FCM not generates token

I am using two Firebase's services in my app. It is realtime database and now I want to implement FCM. The first one works great but about FCM I cannot even generate token. Method onNewToken is not called but I did not generated it yet (I do not see this in console where usually we can send test notifications).
So the question is: are there any special steps that needs to be done if I want to implement those two services in my Android app?
I do everything what is written in tutorials also verified all solutions in Stckoverflow regarding not generating token but nothing works.
Thank you in advance!
There was an issue with dependency version.

Firebase Cloud Messaging not working on Android with Flutter app

I have a Flutter app registered with Firebase for both iOS and Android. The FCM (push notifications) is meant to work for Android as per https://firebase.flutter.dev/docs/messaging/overview/ pretty much out-of-the-box.
Alas, it doesn't.
I added it to pubspec.yaml. I actually added firebase_messaging: ^7.0.3 because anything newer breaks other dependencies. Then I go to Firebase console and send a test message targeted at my Android registered app. Once the message goes through and it says it is Completed no message comes to my simulator.
I know FCM on iOS has an issue with simulator but I have not read anything about it being a case on Android.
I added import 'package:firebase_messaging/firebase_messaging.dart'; and instantiated FirebaseMessaging messaging = FirebaseMessaging(); both in main and results are as above i.e. nothing comes through to my simulator's notifications.
The strangest thing is that I originally followed https://sebastianengel.medium.com/easy-push-notifications-with-flutter-and-firebase-cloud-messaging-d96084f5954f which is substantially more involved and I did get first notification(sic!) but not any subsequent ones. I tried to do this solution from ground up again but the notifications on my simulator remained indifferent.
One thing to bear in mind is that I use few other Firebase services so I know my app is correctly registered with Firebase... unless there's some additional step that I missed and can't see.
Anyone please went through the same ordeal and can pinpoint my blindspot? Thank you.
UPDATE -
I checked error logs and they are empty.
Could you post some more information? For example the console log when you send a notification (try troubleshooting with basic print statements also), better still, send a reproducible snippet of code so I can recreate your problem.
Also make sure you initialize notification handling at a top level function (main preferably).
I'd be happy to work with you, reach me on seanonuoha#gmail.com, when we fix the problem, you post the results here.
Cheers
If you follow the steps in this documentation and still got no message or notification you can check your emulator settings.
Emulator stands default SERIAL CONSOLE DISABLED.
Slide it and turn it to enabled.
My problem solved with this issue.
If you tried and still get problem. Do not hesitate to ask again.
....

android GCM migration to Firebase

I have just migrated my project that uses GCM to Firebase, by following this guide. At the end of the migration guide it mentions that optionally one can replace the Google server endpoints with the ones from Firebase. However, when I try to send messages between devices, they are not delivered.
The only case that works is when I replace my old GOOGLE_API_KEY with the one I got from Firebase but with Google's endpoints!
From what I see in this link others also face similar issues. Has anyone any hint on this?
Well after searching a bit more, I saw that for sending messages via the FCM the server end point should be fcm.googleapis.com/fcm/send, i.e. append the /send. This is a bit confusing, because in the migration guide the /send is not mentioned, whereas in this link and this SO solution it does.
Unless I am missing something, the migration guide should be updated.

How can PhoneGap/Ionic process push notifications from Parse?

I can successfully push notifications to an app, and they show up on my Androids notifications, but I can't get the payload into the app.
I've found this plugin: PushPlugin, but I can't seem to get it to work with Parse, since it asks for a GCM ID, and I don't know what to give it from Parse. Also, the plugin doesn't seem to offer a way to register to certain channels, or even get an installation ID from Parse.
If I include this plugin: phonegap-parse-plugin to take care of the installationID/channels stuff, then I get a runtime error that randomly pops up (adb logcat) saying it can't find com.parse.GcmBroadcastReceiver, and the app crashes.
I just want an Ionic app that can receive a push notification from Parse, and simply display it.
I was in the same boat a week ago and trudging through it here's what I've found:
Here's the best fork I could find for the integrating with parse on cordova(ionic) on android and iOS
https://github.com/grrrian/phonegap-parse-plugin
Make sure to rename the ionic plugin add in the instructions to the grrrian repo not the avivais one in the READ.ME
(He wanted to merge the branch, but I think avivais has finished maintaining it, so the PR is sitting dead)
There will be a compile error brought on by the new ionic Crosswalk feature which is trivial (heh.. ) to fix. Follow these instructions:
https://github.com/katzer/cordova-plugin-local-notifications/issues/426#issuecomment-113166439
Lastly, you need to create an Application Class manually as per the instructions. I didn't know how to do it so I made a comment here about it that should be helpful
https://github.com/grrrian/phonegap-parse-plugin/issues/8#issuecomment-118955744
I'm in the midst of trying to figure out why the notification isn't being received while its in the background though..
Hope this helps someone
EDIT:
Turns out it works fine in the background. All the notifications came in overnight. My thought is that Parse throttles if you send too many messages to one user at once

PUSH NOTIFICATIONS: Change from GCM to Parse

I have an android application where push notifications are implemented by GCM.
I need to change this. I need that with the new release (the app is already in the Store and people already use push with GCM) all the mechanism will be handle from Parse.
Can I simply delete everything concerning GCM and implement everything concerning PARSE and then upload the version of the application and be sure that everything will run the same?
Has anybody an idea if there will be conflicts with doing this? I'm thinking about devices that already have a GCM token for example.
You should try it and see. I think when implementing Parse, the registration ID (unique to every app <--> device) will be generated again. I've written a couple of articles on the topic which are not directly useful but can help in other ways.
Just make sure you follow this thoroughly.

Categories

Resources