FCM Push notifications

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

FCM Push notifications

Post by sphere » Sun Mar 04, 2018 8:38 pm

Hi,
with this little stack you can send a FCM push notification without the need for any middleware (i self use middleware and Pierre helped me with it).
When setting up everything of course you need some PHP and a DB to receive the tokens from your app users.
But this is just simple stack to test when you already know a device token.
This uses the legacy FCM with which you can send to multiple devices in one go, but for now just a single device.
There is also a newer httpv1 API with which you can send to a single device only, but you can distinct Android, ios and web. And you can make subjects where a user can register too etc...

- Partly you need to read this:http://lessons.livecode.com/m/4069/l/59 ... th-android it's based on the previous GCM. The Standalone setting are still valid for FCM, but you can't use all newer options.

- To setup an FCM account, read this:https://pushtry.com/fcmtutorial.aspx

- Of course create an account here:https://firebase.google.com

- To test and send online a notification go here:https://pushtry.com/, this also helps a bit checking the JSON string which is send to the FCM server.

- Hint: If you have already a GCM account and projects, move them over to FCM. Use the new API token. There are people who get more errors while still on GCM.

-You can use this stack to send from LC directly:
FCM send-onlylegacy.zip
- Have fun!

Sphere.

Post Reply

Return to “Android Deployment”