With Android 13 applications need to request permissions to show notifications in the same way you’d need to request permissions to access say the camera or the calendar. Here’s what you need to change as a KNotification user.

Manifest permissions

The need for notification permissions has to be declared in the Android manifest. Without this the user can’t even explicitly allow the app to show notifications on new installations on Android 13.

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.kde.myApp" ...>
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
    <!-- %%INSERT_PERMISSIONS -->
    ...

There’s a merge request for KNotification 6.0 making this fully transparent, which has meanwhile also been backported to KNotification 5.112. So with a sufficiently recent KNotification this step becomes unnecessary for applications.

Runtime permissions

That alone isn’t enough though, it’s merely the prerequisite for the application even being able to request notification permissions. This needs to happen during runtime and requires explicit user consent.

Android 13 asking whether KDE Itinerary is allowed to show notifications.
Android's notification permission request message box.

There is a pending merge request for KNotification adding API for checking and requesting those permissions. While only really doing anything on Android 13 or above it’s available for all platforms for unconditional use in application code.

Until this is available, rolling your own solution for this isn’t terribly difficult either, as Qt provides access to the underlying low-level Android permission API. See for example Itinerary’s implementation, which has support for both Qt5 and Qt6.

UI integration

The probably more difficult question then is where and when to request this. Notifications are typically not the immediate response to a user interaction (quite the contrary), so the usual approach of requesting permission when they are first needed wont work here.

For Itinerary it’s done on the welcome screen and on the settings page for now. An inline message on the main screen might also be an option.

KDE Itinerary offering to request Android notification permissions on its settings page.
KDE Itinerary's notification settings.