Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. Interaction with notifications

Interaction with notifications

Scheduled Pinned Locked Moved Android
databasecomagentic-aitutoriallounge
9 Posts 3 Posters 33 Views 1 Watching
  • 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.
  • E Offline
    E Offline
    Eugenio Roverato
    wrote on last edited by
    #1

    I am trying to emulate the behaviour of the user when he receives a whatsapp call and answers it. To do this I understand I need to access the notification system, this however I don't know how to do this, I can't find anywhere where it is explained. On the contrary there are a lot of people on the net who explain how to create notifications for your app, but I don't need that. Continuing with the reasoning, there should be a function that alerts me if a notification has arrived, at which point a query is made to identify the type of notification, based on the source of the package (com.whatsapp) and the mimetype of the intent. If it passes this check, i.e. it is a whatsapp call, the "reply" button option is selected. So it's all very general anyway, but it's to introduce you to the reasoning I've done, if this is already wrong please let me know, as well as if you know of better options. Thanks ;)

    L D 2 Replies Last reply
    0
    • E Eugenio Roverato

      I am trying to emulate the behaviour of the user when he receives a whatsapp call and answers it. To do this I understand I need to access the notification system, this however I don't know how to do this, I can't find anywhere where it is explained. On the contrary there are a lot of people on the net who explain how to create notifications for your app, but I don't need that. Continuing with the reasoning, there should be a function that alerts me if a notification has arrived, at which point a query is made to identify the type of notification, based on the source of the package (com.whatsapp) and the mimetype of the intent. If it passes this check, i.e. it is a whatsapp call, the "reply" button option is selected. So it's all very general anyway, but it's to introduce you to the reasoning I've done, if this is already wrong please let me know, as well as if you know of better options. Thanks ;)

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See Notifications Overview  |  Android Developers[^].

      E 1 Reply Last reply
      0
      • L Lost User

        See Notifications Overview  |  Android Developers[^].

        E Offline
        E Offline
        Eugenio Roverato
        wrote on last edited by
        #3

        Hi Richard, I had read this guide, but as you can see there is no indication of how to read the notification of a third-party app, there are only instructions on how to create notifications and how the notification is structured in your phone. Do you know any example applications even if only to read notifications as objects? Thanks

        L 1 Reply Last reply
        0
        • E Eugenio Roverato

          Hi Richard, I had read this guide, but as you can see there is no indication of how to read the notification of a third-party app, there are only instructions on how to create notifications and how the notification is structured in your phone. Do you know any example applications even if only to read notifications as objects? Thanks

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Sorry, no. This is a question for Google I am afraid.

          E 1 Reply Last reply
          0
          • L Lost User

            Sorry, no. This is a question for Google I am afraid.

            E Offline
            E Offline
            Eugenio Roverato
            wrote on last edited by
            #5

            I thought so, but I have been searching for a week with different keywords without success. Surely there is a way, I just need to find someone who has used it for some project.

            L 1 Reply Last reply
            0
            • E Eugenio Roverato

              I thought so, but I have been searching for a week with different keywords without success. Surely there is a way, I just need to find someone who has used it for some project.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              If it is a possibility then it should be in the Android Developers documentation, which is where I found that link. Here is another NotificationListenerService  |  Android Developers[^]

              E 1 Reply Last reply
              0
              • L Lost User

                If it is a possibility then it should be in the Android Developers documentation, which is where I found that link. Here is another NotificationListenerService  |  Android Developers[^]

                E Offline
                E Offline
                Eugenio Roverato
                wrote on last edited by
                #7

                That would have been handy, unfortunately 'Notification listeners cannot get notification access'. Edit: But by searching for that library I found this link which fulfils at least half of my request, so thank you. https://www.learn2crack.com/2014/11/reading-notification-using-notificationlistenerservice.html Thanks anyway for your availability

                1 Reply Last reply
                0
                • E Eugenio Roverato

                  I am trying to emulate the behaviour of the user when he receives a whatsapp call and answers it. To do this I understand I need to access the notification system, this however I don't know how to do this, I can't find anywhere where it is explained. On the contrary there are a lot of people on the net who explain how to create notifications for your app, but I don't need that. Continuing with the reasoning, there should be a function that alerts me if a notification has arrived, at which point a query is made to identify the type of notification, based on the source of the package (com.whatsapp) and the mimetype of the intent. If it passes this check, i.e. it is a whatsapp call, the "reply" button option is selected. So it's all very general anyway, but it's to introduce you to the reasoning I've done, if this is already wrong please let me know, as well as if you know of better options. Thanks ;)

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  I would think if you could access the notifications of other apps, that would be a sizeable security issue. Imagine being able to "answer" another app's notifications without user intervention!

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                  E 1 Reply Last reply
                  0
                  • D David Crow

                    I would think if you could access the notifications of other apps, that would be a sizeable security issue. Imagine being able to "answer" another app's notifications without user intervention!

                    "One man's wage rise is another man's price increase." - Harold Wilson

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                    E Offline
                    E Offline
                    Eugenio Roverato
                    wrote on last edited by
                    #9

                    Notifications are handled by the device, no information is sent that could affect security, the user can only interact with what the apps provide. For this there are public APIs and deep links, it is no problem to use them, you just need to know how. What I want to do is to simulate user interaction programmatically, so without using inaccessible private app methods, but with native device functions.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups