UPDATED
21/03/2026
Now You can use Foreground Service to receive your notification even when the app is closed
Hello everyone,
This extension provides full integration with Pushy.me push notification service. It includes device registration, custom notification icons, notification handling, sending notifications, and Pub/Sub functionality.
Before tu use the extension You have to register to Pushy.me website.
Create a new app,
add an App Name
on Android Package Name write the Your app package name
ex: appinventor.ai_yourAppInventorUserName.yourAppInventorAppName
and the Create.
In the Pushy Dashboard you find your ApiKey to use in your App with the extension.
Enable Foreground Service so You can receive notification from Pushy even Your app is closed.
Use Foreground or set your battery to manual for your app.
Add this on Screen1.Initialize

Registers the device with Pushy.me to receive push notifications.
![]()
true Optimization Ignored
false Optimization not Ignored
Used to check the optimization status,
![]()
Open app settings so the user can set battery optimization to manual, use a notifier to ask to the user if he want to go to settings or not (check the aia sample)
Set the the battery optimization to manual to ensure reliable notification delivery when the app is closed.
You can use the battery optimization or the Foreground Service

Sets the small icon displayed in the status bar.
Available Icons:
- "info" or "notification" - Information circle
- "alert" or "warning" or "error" - Warning triangle
- "email" or "mail" or "message" - Email envelope

Sets the large icon displayed in the expanded notification.
• filePath (string) - Path to image file
Files uploaded to App Inventor Media (e.g., "logo.png")
![]()
Removes the large icon from notifications.

Get the NotificationId to manage the notification data

Get the Notification Data then You use a JsonTextDecode to extract the data, check the sample project.
Parameters:
- notificationId (string) - a unique Id to manage different notifications

Clear a notification in the status bar (not opened notification)
Parameters:
- notificationId (string) - a unique Id to manage different notifications

Clear the notification data
Parameters:
- notificationId (string) - a unique Id to manage different notifications
Sends a push notification to a single device.
Parameters:
- apiKey (string) - Your Pushy.me Secret API Key
- deviceToken (string) - Target device token
- title (string) - Notification title
- message (string) - Notification message
- notificationId (string) - a unique Id to manage different notifications
- dataJson (string) - Additional JSON data (use "" if not needed)
Sends a push notification to multiple devices.
Parameters:
- apiKey (string) - Your Pushy.me Secret API Key
- deviceTokens (string) - Comma-separated device tokens (e.g., "token1,token2,token3")
- title (string) - Notification title
- message (string) - Notification message
- notificationId (string) - a unique Id to manage different notifications
- dataJson (string) - Additional JSON data (use "" if not needed)
Sends a push notification to all devices subscribed to a topic.
Parameters:
- apiKey (string) - Your Pushy.me Secret API Key
- topic (string) - Topic name
- title (string) - Notification title
- message (string) - Notification message
- notificationId (string) - a unique Id to manage different notifications
- dataJson (string) - Additional JSON data (use "" if not needed)
Subscribes a device to a topic to receive notifications sent to that topic.
Parameters:
- apiKey (string) - Your Pushy.me Secret API Key
- deviceToken (string) - Device token to subscribe
- topic (string) - Topic name
Unsubscribes a device from a topic.
Parameters:
- apiKey (string) - Your Pushy.me Secret API Key
- deviceToken (string) - Device token to unsubscribe
- topic (string) - Topic name
Checks if a device is currently online.
Parameters:
- apiKey (string) - Your Pushy.me Secret API Key
- deviceToken (string) - Device token to check
Gets the list of device tokens subscribed to a topic.
Parameters:
- apiKey (string) - Your Pushy.me Secret API Key
- topic (string) - Topic name
Called when device registration succeeds.
Parameters:
- token (string) - The device token
Called when device registration fails.
Parameters:
- error (string) - Error message
Called when a notification is sent successfully.
Parameters:
- success (boolean) - Always true for this event
- messageId (string) - Unique message ID from Pushy
Called when sending a notification fails.
Parameters:
- error (string) - Error message
Called when a device is subscribed to a topic.
Parameters:
- success (boolean) - True if successful, false if failed
- topic (string) - Topic name
Called when a device is unsubscribed from a topic.
Parameters:
- success (boolean) - True if successful, false if failed
- topic (string) - Topic name
Called when device presence information is received.
Parameters:
- isOnline (boolean) - True if device is currently online
- lastActive (long) - Unix timestamp in milliseconds of last activity
Called when the list of topic subscribers is received.
Parameters:
- subscribers (string) - JSON array of device tokens
Called when a Pub/Sub operation fails.
Parameters:
- error (string) - Error message
Extension
com.pushy.aix (2.3 MB)
Project sample:
PushyApp.aia (2.3 MB)
If You use this sample the package name to write in the pushy dashboard is:
appinventor.ai_mpbejo.PushyApp
in the pushy dashboard You can send notifications to test your app remember in the NOTIFICATION DATA write:
{
"title": "Your Title",
"message": "Your Message!",
"notificationId": "1234567890"
}
To test your app You have to install in your device, and remember to check the notification enable e battery optimization set manually in the app android settings, to receive notifications when the app is closed or the smartphone is standby
I hope You find useful.
Best Regards
Marco
















