Android Question Migrating from GCM to Firebase - any gotchas?

nwhitfield

Active Member
Licensed User
Longtime User
My current Messenger app for one of my websites uses GCM for notifiying members when they have new messages, and to trigger an inbox refresh. That's largely because Firebase wasn't a thing when I did the first iteration of the app.

In the iOS version, I'm already using Firebase (though I never seem to actually get a unique ID passed to the app, so am relying on topic based notifications, rather than device).

Now that the web site has group messaging, I want to roll that out to the apps, and obviously for group messaging, topic notifications make sense, so I figured it's time to migrate the Android app from GCM.

Obviously, I've looked at the examples, and I've coded stuff to send from the web site to Firebase for our iOS client, so I don't anticipate any major issues. But are there any specific snags or things to watch out for that people might have encountered doing the same move in the past?

Is Firebase on Android more reliable at getting the individual device IDs than it is on iOS, for instance?

(On Android, app starts up, signs in to web site API, registers with GCM and always without fail gets a device id, which it then passes to the API to request notifications. On iOS, I don't think I've ever seen the device ID returned when I register for notifications, hence my switch to using a per-user topic)
 

An Schi

Well-Known Member
Licensed User
I think the most commen mistake people here make is to use the firebase console webpage to send messages, instead of the suggested b4j or php.
In addition to Erels tutorials, @KMatle wrote some tutorials about FCM. You should have a look at them, too.
 
Upvote 0

nwhitfield

Active Member
Licensed User
Longtime User
The back end is all fine; the site's in PHP, and I designed the notification stuff to support multiple channels; we already have a firebase-ios one.

My main concern is the reliability of getting the individual device IDs when registering
 
Upvote 0
Top