How can I make push notifications using my app?

Hello, I am developing an app to install on Homey Pro.
After creating an action card, I generated a notification in the registerRunListener as follows:

const notificationAction = this.homey.flow.getActionCard('send_notification');
notificationAction.registerRunListener(async () => {
  const alertMessage = await alertToken.getValue();
  this.log(`notificationAction: message:`, alertMessage);
  await this.homey.notifications.createNotification({
    excerpt: alertMessage
  });
  return true;
});

I would like to replace this notification with a push notification.
Is there a way to create a push notification?

There isn’t, and I think for a good reason: apps shouldn’t send push notifications, it should be up to the user to configure a flow that sends them a push notification if they want to.

3 Likes

Yes, that seems correct.
It would be appropriate for users to intuitively use the system’s push notifications.
Thank you!

You can write a timeline notification from you app. And the user can activate push forward in timeline settings.
Just as idea…

1 Like

Only the owner of a Homey

1 Like