#StackBounty: #android #android-notifications #huawei Strange allow/deny question on Huawei 5.1 phone when showing notification

Bounty: 50

So it turns out that Huawei phones with 5.1 can’t display MediaStyle notifications so while fixing that, I made a very simple notification test and I get a strange question asking Allow App Name to push messages to the notification panel.

I don’t use push in any way, in fact the screenshot below is for an app that all it does is show a sample notification, nothing else.

How can I make it not show that?

This is the code:

 Notification notification = new Notification.Builder(getApplicationContext())
                .setContentTitle("Track title")
                .setContentText("Artist - Album")

                .addAction(R.drawable.ic_add_black_24dp, "fwd", pi)
                .addAction(R.drawable.ic_android_black_24dp, "fwd", pi)
                .addAction(R.drawable.ic_archive_black_24dp, "fwd", pi)
                .addAction(R.drawable.ic_arrow_back_black_24dp, "fwd", pi)
                .addAction(R.drawable.ic_aspect_ratio_black_24dp, "fwd", pi)
                .addAction(R.drawable.ic_fast_forward_black_24dp, "fwd", pi)
                .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.vectors_525058875))

        notificationManager.notify(300, notification);

This is the screenshot.

enter image description here

What am I doing wrong? I tried taking out all the actions, that didn’t help. Took out title and context, that didn’t help. Took out large icon, auto cancel, ongoing, etc, didn’t help.

Please note that I am not using Push in any way and this doesn’t seem to be related to that. Also I a using the support compat libraries to make my notification but on this example I didn’t just to make sure that wasn’t the issue.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.