Iterate over status bar notification elements











up vote
0
down vote

favorite












How can I iterate over status bar notification elements? I'm using NotificationListenerService. I want to do this to get the direction icon/picture.



I already tried sbn.getNotification().getSmallIcon(), sbn.getNotification().extras.get(Notification.EXTRA_PICTURE) and sbn.getNotification().getLargeIcon() but I'm not able to get the picture/icon



I would really appreciate if someone can help me.



enter image description here










share|improve this question






















  • Notice how the notification doesn't align with how other notifications look - this is most likely a custom content view, and it has an ImageView as one of the components in the layout.
    – Pawel
    Nov 12 at 18:40

















up vote
0
down vote

favorite












How can I iterate over status bar notification elements? I'm using NotificationListenerService. I want to do this to get the direction icon/picture.



I already tried sbn.getNotification().getSmallIcon(), sbn.getNotification().extras.get(Notification.EXTRA_PICTURE) and sbn.getNotification().getLargeIcon() but I'm not able to get the picture/icon



I would really appreciate if someone can help me.



enter image description here










share|improve this question






















  • Notice how the notification doesn't align with how other notifications look - this is most likely a custom content view, and it has an ImageView as one of the components in the layout.
    – Pawel
    Nov 12 at 18:40















up vote
0
down vote

favorite









up vote
0
down vote

favorite











How can I iterate over status bar notification elements? I'm using NotificationListenerService. I want to do this to get the direction icon/picture.



I already tried sbn.getNotification().getSmallIcon(), sbn.getNotification().extras.get(Notification.EXTRA_PICTURE) and sbn.getNotification().getLargeIcon() but I'm not able to get the picture/icon



I would really appreciate if someone can help me.



enter image description here










share|improve this question













How can I iterate over status bar notification elements? I'm using NotificationListenerService. I want to do this to get the direction icon/picture.



I already tried sbn.getNotification().getSmallIcon(), sbn.getNotification().extras.get(Notification.EXTRA_PICTURE) and sbn.getNotification().getLargeIcon() but I'm not able to get the picture/icon



I would really appreciate if someone can help me.



enter image description here







android android-notifications android-maps-v2






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 12 at 18:34









JBird

165




165












  • Notice how the notification doesn't align with how other notifications look - this is most likely a custom content view, and it has an ImageView as one of the components in the layout.
    – Pawel
    Nov 12 at 18:40




















  • Notice how the notification doesn't align with how other notifications look - this is most likely a custom content view, and it has an ImageView as one of the components in the layout.
    – Pawel
    Nov 12 at 18:40


















Notice how the notification doesn't align with how other notifications look - this is most likely a custom content view, and it has an ImageView as one of the components in the layout.
– Pawel
Nov 12 at 18:40






Notice how the notification doesn't align with how other notifications look - this is most likely a custom content view, and it has an ImageView as one of the components in the layout.
– Pawel
Nov 12 at 18:40














1 Answer
1






active

oldest

votes

















up vote
0
down vote













You can't do that. It'd be a privacy issue if your app was allowed to see / view / read notification elements from other applications.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53268130%2fiterate-over-status-bar-notification-elements%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    You can't do that. It'd be a privacy issue if your app was allowed to see / view / read notification elements from other applications.






    share|improve this answer

























      up vote
      0
      down vote













      You can't do that. It'd be a privacy issue if your app was allowed to see / view / read notification elements from other applications.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        You can't do that. It'd be a privacy issue if your app was allowed to see / view / read notification elements from other applications.






        share|improve this answer












        You can't do that. It'd be a privacy issue if your app was allowed to see / view / read notification elements from other applications.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 12 at 18:55









        Jeffrey Blattman

        16.3k564114




        16.3k564114






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53268130%2fiterate-over-status-bar-notification-elements%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

            ComboBox Display Member on multiple fields

            Is it possible to collect Nectar points via Trainline?