Notification Icon not Showing

iwan.deejay

Member
Licensed User
Longtime User
I'm using notification in my program, and I assign the logo to be same as the application logo. The logo shows on the notification bar, however, the logo didn't show up when I open the notification panel; just blank.

Anyone can help me?
 

GMan

Well-Known Member
Licensed User
Longtime User
Is there a restriction in the icon size ?
And what format is preferred - .png or .ico ?
Can we define the extension in the n.icon, like "eventicon.ico" ?
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
It works with a Standard 16x16 which has to be a .png-file.

I tried out all other formats and sizes, only this works.

How can we capture the event when the Actionbar item was clicked ?
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
I'm using notification in my program, and I assign the logo to be same as the application logo. The logo shows on the notification bar, however, the logo didn't show up when I open the notification panel; just blank.

Anyone can help me?

Hi iwan.deejay,

I guess that you forget do this as picture attached.
 

Attachments

  • restoredfile.png
    restoredfile.png
    8.8 KB · Views: 367
Upvote 0

iwan.deejay

Member
Licensed User
Longtime User
It works with a Standard 16x16 which has to be a .png-file.

I tried out all other formats and sizes, only this works.

How can we capture the event when the Actionbar item was clicked ?
I was actually using a 32x32 png file. Shouldn't it work?
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
show us some code...
 
Upvote 0

iwan.deejay

Member
Licensed User
Longtime User
This is my code...
B4X:
n.Initialize
title=TotalEvents & " incoming events"
body="Next Event : " & currentEvent
n.SetInfo(title,body,Main)
If TotalEvents>1 Then
   n.Number=TotalEvents
End If
n.Light=True
n.AutoCancel=True
n.Icon="logo32"   ' 32x32 png file
n.OnGoingEvent=False
n.Sound=True
n.Vibrate=True
n.Notify(1)
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
It seems the built-in notification library doesn't work for me, so I decided to use @barx's notification library instead. Thank you for the library, it works fine.

By the way, will it work on API level 8?

You can see the installed (and possible) API's i.e. in the Manifest-Editor
 
Upvote 0

geola

Member
Licensed User
Longtime User
had the same issue and figured out the reason to solve this.

You have to set the icon with

n.Icon="logo32"

in your code before you are defining the setinfo with

n.SetInfo(title,body,Main)

Regards,
Michael
 
Upvote 0
Top