KNotifications
knotificationpermission.cpp
18 return QtAndroidPrivate::checkPermission(QStringLiteral("android.permission.POST_NOTIFICATIONS")).result() == QtAndroidPrivate::PermissionResult::Authorized
23void KNotificationPermission::requestPermission(QObject *context, const std::function<void(Qt::PermissionStatus)> &callback)
34 callback(res == QtAndroidPrivate::PermissionResult::Authorized ? Qt::PermissionStatus::Granted : Qt::PermissionStatus::Denied);
46void KNotificationPermission::requestPermission([[maybe_unused]] QObject *context, const std::function<void(Qt::PermissionStatus)> &callback)
KNOTIFICATIONS_EXPORT void requestPermission(QObject *context, const std::function< void(Qt::PermissionStatus)> &callback)
Request notification permissions.
Definition knotificationpermission.cpp:46
KNOTIFICATIONS_EXPORT Qt::PermissionStatus checkPermission()
Check if the current application has permissions to show notifications.
Definition knotificationpermission.cpp:41
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
QueuedConnection
PermissionStatus
QFuture< QtAndroidPrivate::PermissionResult > checkPermission(const QString &permission)
QFuture< QtAndroidPrivate::PermissionResult > requestPermission(const QString &permission)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:06:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:06:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.