Android Question Status Bar Icon definition

Bob Spielen

Active Member
Licensed User
Hi,
The command Service.AutomaticForegroundMode=Service.AUTOMATIC_FOREGROUND_ALWAYS
puts a icon in the status bar. How can I define this icon?
Thanks in advance
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Bob Spielen

Active Member
Licensed User

Thanks a lot for the reply....but when I put

B4X:
    Dim n As Notification
    n.Initialize
    n.Icon = "notshp.png"
    Service.StartForeground ( 1, n)
    Service.AutomaticForegroundMode=Service.AUTOMATIC_FOREGROUND_ALWAYS
    Pw.PartialLock

I get the error msg:

java.lang.ClassCastException: anywheresoftware.b4a.objects.NotificationWrapper$NotificationData cannot be cast to android.app.Notification

Can you help me .......
 
Upvote 0
Top