FCM Push notifications

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

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
Posts: 586
Joined: Sat Sep 27, 2014 10:32 am
Location: the Netherlands

FCM Push notifications

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

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
fcm send legacy
(1.98 KiB) Downloaded 15 times
- Have fun!

Sony HitBit HB75P MSX-1, Amiga 500 v1.3, Amiga 600, Amiga 1200, Pentium 1 and onwards to all loose PC crap boards which already was in the Amiga for ages not mentioning the startup speed, which we now have again with SSD :D

Post Reply

Return to “Android Deployment”