Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Android Notifications in background



  • Hi, I have an application for Android in C++ in QT and server TCP on RaspberrPi in Python. Client and server connets and generally everything is OK, but I would like to get notifications from serwer... I use an example from [https://doc.qt.io/qt-5/qtandroidextras-notification-example.html](link url) and I've found on somke forum the way how to do it i C++... It/s working when I for example add function to button, but I would like to have notification in background, when something ihappens on server and I don't have to run application on android.

    I found something about services on QT site, but I can;'t understand it :/ And it's in Java generraly.

    Could you help me?


  • Lifetime Qt Champion

    Hi,

    This example shows local notifications. If I understand things correctly, you'd rather like push notifications, correct ?



  • Yes. For example I want to get notification when someone else connect to server... Something like that.


  • Lifetime Qt Champion

    In that case you have to enable push notifications at the application level but also implement it in your server.

    Note that push notification are currently not implemented in Qt itself though Felgo has something for it, so you might want to check with them.



  • Ok, thanks. I will try to do something with this.


Log in to reply