Push Notification on Android Phone with Qt
Unsolved
Mobile and Embedded
-
Hi,
I tried this example https://doc.qt.io/qt-5/qtandroidextras-notification-example.html
but I didn't receive any notification on the phone.
I am running Qt5.12 and here is my main:QQmlApplicationEngine engine; NotificationClient *notificationClient = new NotificationClient(&engine); engine.rootContext()->setContextProperty(QLatin1String("notificationClient"),notificationClient); engine.load(QUrl(QStringLiteral("qrc:/assets/page.qml"))); engine.addImportPath(QStringLiteral("qml")); return app.exec();
And on qml I just do this:
notificationClient.notification = "Notification!"
Any idea why? Do I need permission?
Is there also a way to play sound on the notification like an alarm? -
Hi,
What version of Android are you using ?
Something is not clear, are you experiencing that with the example or with your own application ? -
What do you mean by own application ? I thought you were using the notification example ?
Just one thing, your thread title mentions push notifications, this example doesn't implement them.