Skip to content

Conversation

@alexjba
Copy link
Collaborator

@alexjba alexjba commented Jan 26, 2026

This commit provides QML ready APIs for push notifications.

Available API:

  • PushNotifications.status (Unknown, Granted, Denied). Represents the OS permission state
  • PushNotifications.token (iOS only TODO: Android). The token is necessary in order to register a device for push notifications. It's usually registered in the backend to provide push notifications regardless if the app is open or not.
  • PushNotifications.request(). Request push notifications permissions from the OS
  • PushNotifications.requestToken() (iOS only TODO: Android). Request the push notifications token from the OS
  • PushNotifications.openSettings(). Open the app settings to update the push notifications permissions. This is necessary once the user has denied the initial OS permission dialog. It cannot be triggered again and the user needs to navigate to settings in order to update the permissions.
  • PushNotifications.showNotification(title, message, identifier). Display a local notification
  • PushNotifications.clearNotifications(identifier). Clear app notifications

This commit provides QML ready APIs for push notifications.
### Android Maven helper

MobileUI ships a small Android helper (Java) to handle permissions and local notifications.
It is published to `mavenLocal` during Android builds.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android is a little bit special here. It needs some java implementation and as a result the MobileUI lib will also provide a jar. When compiled with FetchContent as we're doing in StatusQ it's easy because all we need to do is to declare the dependency in the app gradle file and the lib will be pulled on app pkg from the maven repo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the gradle stuff is just copied from QT installation. We could do it without it, but it complicates things unnecessarily for the cmake

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alexjba alexjba merged commit 62fdef3 into master Jan 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants