android GCM migration to Firebase - android

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.

Related

Push notifications not working on White-Label Rocket Chat App

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.

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.
....

Parse.com doesn't push to android

I am using parse's latest SDK with android and i implemented it with my project which also using MaterialViewPager framework from github but for some reason, when i send a push from the web interface (dashboard), it says recipient found but "Push Sent 0".
Your code seems to right but this are many issues with Parse Push for Android. I have experienced same kind of issue many times. Sometimes, push notification arrives late. There are many questions about these problems on SO. Unfortunately, there isn't any solution that works for these situations. The clear solution I found is to use GCM.
instead of trying to solve a problem which i don't really know if it's from my app or parse itself as i tried so many things and wasted 2 weeks on that. I moved from parse to Google Cloud Messaging and it works fine. Push notification sent like instantly.

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