Extension: Modified Notification Style to support Android 12 and above

Unable to change icon of the notification. Set it from assets, 48x48 png file, but icon does not change. Please, help

Hi, can you please show me your blocks?

I set it on the Designer page, not with blocks.

And what happens, if you set it via blocks?
Taifun

Understood. It because I'm using these notifications inside of background procedure with Itoo extension. If I define an icon inside this procedure, it works.

Hi everyone,
I repeat my post already posted in the original thread now closed.
With AppInventor I created a streaming player application for my Radio (and TV).
I'm updating the application with new features and I wanted to replace the current notification code with this extension, which works fine, but doesn't communicate properly metadata (image, artist/title, lyrics...) to connected bluetooth devices (headphones, cars, etc. ..); and it doesn't even communicate commands from buttons.
The reason for the metadata is that live streaming doesn't have a fixed duration like a music file, and therefore you need to set this because android needs to know about it. Without this information, the notification system does not communicate metadata correctly with the device.
If you could fix this by inserting a block that allows you to specify the duration of the streamed content, (typically indeterminate live stream has duration -1 ) and thus fix the bug, I'd like to use that for my update.
Thank you.

p.s. Thanks to Patryk_F for the hint below; that is the extension that I am currently using, but that lacks some possibilities, some of which I have personally corrected by writing and rewriting part of the code (such as the update for Android 12+), others it is very complex because, given the structure, you would have to rewrite all the code.

Both extensions are open source, so you can modify them for your purposes.

Of course, I thought they were useful suggestions for the whole community, to improve the extensions for everyone's benefit.
Whoever developed the extension knows the procedure better, and certainly takes less time than us who are "amateurs" of the code, to implement its functions.
Thank you for your answer.

Hi, I'm having trouble understanding what exactly you want to achieve.

As a note, this extension is not meant to be a "music streaming" extension, it just provides interfaces for notifications.

You are right, and it is precisely the notifications that I am talking about.
Among the options there is also the possibility to use it with various types of notifications such as music and audio, and if you use it for notifications involving a player playing streaming audio (not just audio files), it doesn't work well with devices connected in bluetooth for reasons that I have said.
I thought it was interesting for everyone to report it for any improvements, and I don't want to get it just for me.
I apologize if I have been misunderstood and if interested I could explain better.

Hey, Im talking about Android 11 to not make any confusion. I have created an Chat App with Firebase, but I have no idea how to make a notification when a message is received. Here's the .aia file :
App_Conversa.aia (182.6 KB)

Can someone help me pls?

Use the dataChanged event (if you are using the Firebase component) to trigger a notification.

Yeah, thanks a lot man!

Hello how to use these extension with background extension?

You can find several examples in the itioo thread

Taifun

1 Like

This is a great extension, however I've found a pretty significant bug in it. If the screen is locked with a notification in the status bar, or if it gets a notification while the screen is locked, it is EXTREMELY difficult to unlock the screen. It takes at least 3 times of hitting the power button before the screen either stays on long enough to unlock it or it actually does anything when you swipe on the screen. Tested on 3 different phones (Android 11, 12 and 13) so it's not just a fluke.

I'm not sure if this is because of the extension, you can share a demo project with us over here, so that I can take a look at what's wrong

testNotif_default.aia (222.6 KB)

Yeah, even just this basic demo app has the issue. You can't check the "allow reply" checkbox in this demo because you'll get an error. This demo is using the official extension, which doesn't allow that function. I also compiled my own with rush that simply changes FLAG_IMMUTABLE to FLAG_MUTABLE and that allows the reply function. That's not what's in this demo though because I didn't want that to be blamed for the main issue here. Using either my compiled extension or the official extension like what's in this demo, causes extreme difficulty with unlocking the screen if there's a notification when the screen is off.

The discussion of the Notification Style extension includes the configurable Properties of Importance and Priority.

  • Importance Channel
    Define the importance of the channel check here for more information.
    blocks (68)
    component_set_get (13)
    Default: 2
  • IMPORTANCE_MIN âžœ 0
  • IMPORTANCE_LOW âžœ 1
  • IMPORTANCE_DEFAULT âžœ 2 (default)
  • IMPORTANCE_HIGH âžœ 3
  • IMPORTANCE_MAX âžœ 2
  • Priority Notification
    Set notification priority, check here for more information
    blocks (67)
    component_set_get (12)
    Default: 2
  • PRIORITY_MIN âžœ 0
  • PRIORITY_LOW âžœ 1
  • PRIORITY_DEFAULT âžœ 2 (default)
  • PRIORITY_HIGH âžœ 3
  • PRIORITY_MAX âžœ 2

For both, the Default value listed is "2". However the "more information" link leads me to the conclusion that "Default" is another constant in both cases.

Default importance seems to be "3"

Default notification importance: shows everywhere, makes noise, but does not visually intrude.

Constant Value: 3 (0x00000003)

And Default Priority seems to be "0"

Default notification priority. If your application does not prioritize its own notifications, use this value for all notifications.

Constant Value: 0 (0x00000000)

What am I missing? Are the default values for Priority and Importance both "2" or are they "0" and "3" respectively?

Kind regards,
Randal

Hi, ich habe die Extension(siehe titel) benutzt in einer App. Die schickt leider keine App Benachritigungen. Weiß jemand woran es liegen könnte?