[PAID]
FcmPush
Firebase Cloud Messaging push notifications: device tokens, topics, tray notifications, tap handling, and optional HTTP v1 sending.
Extension specifications
| Package | in.sarthakdev.fcmpush |
| Version | 1.0 |
| Price | $7.99 USD |
| Category | Tools |
| Updated | 23 September 2026 |
| Platforms | MIT App Inventor, Kodular, Niotron, Android Builder, Thunkable |
| Built using | FAST |
| Store | FcmPush for App Inventor | SarthakDev.in |
Paid buyers get this AIX by email after checkout. Import it from Projects โ Import extension.
About
Firebase Cloud Messaging on the device: tokens, topics, tray notifications, tap handling, and sending. Set ApiKey, ApplicationId and ProjectId (or paste google-services.json). Set ServiceAccountJson too if this app should send, then call Initialize. SendToToken and SendToTopic use that key. Keep the service account in an admin app you control.
Features
- Official Firebase Messaging SDK, configured at runtime โ no google-services Gradle plugin
- Initialize from designer keys or the full google-services.json text
- Service account is checked during Initialize, then SendToToken and SendToTopic use it
- Device token, token refresh, and delete
- Subscribe and unsubscribe to topics
- Tray notifications in the foreground and for data messages while the app is closed
- NotificationOpened when the user taps a push, including messages Android drew in the background
- Android 13 notification permission block
- Optional HTTP v1 send to a token or a topic from an admin app
- Android 5.0 (API 21) or newer
Example
Import FcmPush, drag it onto the screen, then add TokenLabel, MessageLabel, SubscribeButton, SendButton, and a Notifier. The blocks below are the receive app and the admin send app.
- ApiKey, ApplicationId, and ProjectId come from google-services.json. SenderId can stay empty; it is read from ApplicationId.
- AutoInitialize is on, so Initialized fires after the screen starts once those three are filled in.
- Leave ServiceAccountJson empty on the app that only receives.
- Paste the service account JSON into ServiceAccountJson only on an admin app you control. Initialize checks it, then SendToToken and SendToTopic can send. Anyone who extracts that key can message your users.
Receive
Screen.Initialize asks for notification permission. Initialized calls GetToken, and GotToken writes the token into TokenLabel. Save that token if you want to message this phone later. MessageReceived shows the title and body. NotificationOpened does the same when someone taps the tray notification. SubscribeButton joins the topic news. ErrorOccurred shows why a block failed.
Send
Put this in the admin app, with ServiceAccountJson set. SendButton pushes to the topic news and attaches a small data dictionary. MessageSent fires when FCM accepts it. Phones subscribed to news then run MessageReceived.
๐ Events
Initialized
Firebase is ready. Call GetToken to receive. If ServiceAccountJson was set, SendToToken and SendToTopic are ready too.
Got Token
The device token. Save it on your server or database to send pushes to this device.
- token (
text)
Token Refreshed
Firebase issued a new token (first launch, reinstall, or rotation). Update it on your server.
- token (
text)
Token Deleted
The token was deleted.
Topic Subscribed
The device is subscribed to the topic.
- topic (
text)
Topic Unsubscribed
The device is unsubscribed from the topic.
- topic (
text)
Permission Result
Result of RequestNotificationPermission.
- granted (
boolean)
Message Received
A push arrived. data is a dictionary of the message's data keys. whileClosed is true for data messages that arrived while no screen was open and are delivered now.
- messageId (
text) - from (
text) - title (
text) - body (
text) - data (
dictionary) - whileClosed (
boolean)
Notification Opened
The user tapped a push notification and the app opened. title and body are empty for notifications Android drew while the app was in the background; data is always filled.
- messageId (
text) - title (
text) - body (
text) - data (
dictionary)
Message Sent
FCM accepted the message. messageName looks like projects/PROJECT/messages/MESSAGE.
- messageName (
text)
Error Occurred
Something failed. action is the block that failed; message says why.
- action (
text) - message (
text)
๐ง Methods
Initialize
Start Firebase for receiving, and for sending when ServiceAccountJson is set. Fires Initialized.
Initialize From Json
Start Firebase from the full text of google-services.json. Picks the client that matches this app's package name, else the first Android client.
- googleServicesJson (
text)
Get Token
Fetch this device's FCM registration token. Fires GotToken.
Delete Token
Delete this device's token. The device stops receiving pushes until GetToken is called again. Fires TokenDeleted.
Subscribe To Topic
Subscribe this device to a topic (letters, numbers, - _ . ~ %). Fires TopicSubscribed.
- topic (
text)
Unsubscribe From Topic
Unsubscribe this device from a topic. Fires TopicUnsubscribed.
- topic (
text)
Request Notification Permission
Ask for the Android 13+ notification permission. On older Android this returns granted right away. Fires PermissionResult.
Notifications Enabled
True if this app is allowed to show notifications right now.
Returns boolean.
Show Notification
Show a local tray notification now. data is a dictionary or JSON text (or empty) and is returned in NotificationOpened when tapped.
- title (
text) - body (
text) - data (
any)
Clear Notifications
Remove every notification this app has shown.
Send To Token
Send a push to one device token with the service account from Initialize. Fires MessageSent.
- token (
text) - title (
text) - body (
text) - data (
any)
Send To Topic
Send a push to every device subscribed to a topic with the service account from Initialize. Fires MessageSent.
- topic (
text) - title (
text) - body (
text) - data (
any)
โ๏ธ Properties
Api Key
Web API key from google-services.json (client > api_key > current_key). Starts with AIza.
Type: text
Application Id
Firebase Android app id from google-services.json (mobilesdk_app_id), like 1:1234567890:android:abc123.
Type: text
Project Id
Firebase project id from google-services.json (project_info > project_id).
Type: text
Sender Id
Optional. Project number / sender id (project_info > project_number). Read from ApplicationId when blank.
Type: text
Auto Initialize
Call Initialize automatically after Screen.Initialize when ApiKey, ApplicationId and ProjectId are set.
Type: boolean ยท Default: true
Show Notification When Open
Show a tray notification even while the app is open. MessageReceived fires either way.
Type: boolean ยท Default: true
Show Data Notifications
For data-only messages that contain title/body keys, show a tray notification (also when the app is closed).
Type: boolean ยท Default: true
Use App Icon
Use the app icon as the small notification icon. Off uses a white Android chat glyph, which renders cleanly on every launcher.
Type: boolean ยท Default: false
Channel Name
Name of the notification channel shown in Android settings (Android 8+).
Type: text ยท Default: Notifications
Service Account Json
Firebase service account key JSON, used to send. Checked during Initialize. Leave empty on apps that only receive. Only put this in an admin app you control โ anyone who extracts it can send to your users.
Type: text
Send As Data Message
When on, SendToToken / SendToTopic put title and body inside data so MessageReceived fires even when the receiving app is in the background.
Type: boolean ยท Default: false
Token
Last FCM registration token seen on this device, or empty.
Type: text
Is Initialized
True after Initialize succeeded.
Type: boolean
Get the AIX
Paid extension. Buy it on the store, then import from Projects โ Import extension.
Built by Sarthak Gupta ยท hi@sarthakdev.in ยท sarthakdev.in


















