Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Push Notifications, Android and iOS
Forum Update on Monday, May 27th 2025

Push Notifications, Android and iOS

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 3 Posters 871 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    adddeeee
    wrote on 16 Sept 2021, 10:50 last edited by
    #1

    Hello!

    I've developed an app showing football scores. However, I would like to send the user a notification whenever the score changes in a game.

    Currently I have solved it in Android using a foreground service. It is polling the server every 10 seconds and displays a notification to the user when a new goal is identified.

    However, that method is not preferred, and not supported by iOS. We need push notifications.

    But how do I, in app, turn off specific notifications? The server will send notifications, and it will be shown on the phone no matter what.

    Is the solution to add logic on the server to keep track of all devices and what notifications they want to be silenced?

    How is this generally solved?

    R 1 Reply Last reply 16 Sept 2021, 12:15
    0
    • A adddeeee
      16 Sept 2021, 10:50

      Hello!

      I've developed an app showing football scores. However, I would like to send the user a notification whenever the score changes in a game.

      Currently I have solved it in Android using a foreground service. It is polling the server every 10 seconds and displays a notification to the user when a new goal is identified.

      However, that method is not preferred, and not supported by iOS. We need push notifications.

      But how do I, in app, turn off specific notifications? The server will send notifications, and it will be shown on the phone no matter what.

      Is the solution to add logic on the server to keep track of all devices and what notifications they want to be silenced?

      How is this generally solved?

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 16 Sept 2021, 12:15 last edited by raven-worx
      #2

      @adddeeee
      there are many services available which inform the device about notifications (by Google and also 3rd party ones) which as you said do not require polling but rather work by publish/subscribe wise.
      Qt has no integration by now as far as i know so you would need to integrate hem natively.
      Mostly those are not entirely free since it requires a cloud backend to distribute push notifications.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      A 1 Reply Last reply 16 Sept 2021, 12:29
      1
      • R raven-worx
        16 Sept 2021, 12:15

        @adddeeee
        there are many services available which inform the device about notifications (by Google and also 3rd party ones) which as you said do not require polling but rather work by publish/subscribe wise.
        Qt has no integration by now as far as i know so you would need to integrate hem natively.
        Mostly those are not entirely free since it requires a cloud backend to distribute push notifications.

        A Offline
        A Offline
        adddeeee
        wrote on 16 Sept 2021, 12:29 last edited by
        #3

        @raven-worx
        Thank you!

        Yes, I have understood it needs to be made natively.

        But what would be the intended way to handle user specific settings regarding what notifications shall be enabled? Is it something our server would need to keep track on?

        R 1 Reply Last reply 16 Sept 2021, 12:39
        0
        • A adddeeee
          16 Sept 2021, 12:29

          @raven-worx
          Thank you!

          Yes, I have understood it needs to be made natively.

          But what would be the intended way to handle user specific settings regarding what notifications shall be enabled? Is it something our server would need to keep track on?

          R Offline
          R Offline
          raven-worx
          Moderators
          wrote on 16 Sept 2021, 12:39 last edited by
          #4

          @adddeeee
          i think on android you need to register notification channels(?) which then can be configured by the user via the system UI.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          A 1 Reply Last reply 16 Sept 2021, 14:01
          0
          • R raven-worx
            16 Sept 2021, 12:39

            @adddeeee
            i think on android you need to register notification channels(?) which then can be configured by the user via the system UI.

            A Offline
            A Offline
            adddeeee
            wrote on 16 Sept 2021, 14:01 last edited by
            #5

            @raven-worx
            But in the case of push notifications, is that still used?

            I thought push notifications were not really connected to an app, but rather to a device?

            That is, through the app, a device token is registered, which will be used by the server to trigger a push notification.

            Is that correctly understood?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 16 Sept 2021, 18:57 last edited by
              #6

              Hi,

              They are delivered to your device but are linked to the application.

              The folks at Felgo have plugins that can help in that regard.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              1/6

              16 Sept 2021, 10:50

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved