B Bob Spielen Active Member Licensed User Longtime User Mar 6, 2019 #1 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
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 Mar 6, 2019 #2 https://www.b4x.com/android/help/core.html#service_startforeground Upvote 0
B Bob Spielen Active Member Licensed User Longtime User Mar 6, 2019 #3 DonManfred said: https://www.b4x.com/android/help/core.html#service_startforeground Click to expand... Thanks a lot for the reply....but when I put Code: Copy 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
DonManfred said: https://www.b4x.com/android/help/core.html#service_startforeground Click to expand... Thanks a lot for the reply....but when I put Code: Copy 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 .......
DonManfred Expert Licensed User Longtime User Mar 6, 2019 #4 try to use the notification build with the Notification builder class.... Upvote 0
B Bob Spielen Active Member Licensed User Longtime User Mar 6, 2019 #5 DonManfred said: try to use the notification build with the Notification builder class.... Click to expand... Besten Dank! Wünsche Ihnen noch ein SUPER Tag!!!!! Upvote 0
DonManfred said: try to use the notification build with the Notification builder class.... Click to expand... Besten Dank! Wünsche Ihnen noch ein SUPER Tag!!!!!
DonManfred Expert Licensed User Longtime User Mar 6, 2019 #6 Bob Spielen said: Besten Dank! Wünsche Ihnen noch ein SUPER Tag!!!!! Click to expand... Sounds to me like you have had success now ;-) Wünsche Dir ebenfalls einen schönen Tag ;-) Upvote 0
Bob Spielen said: Besten Dank! Wünsche Ihnen noch ein SUPER Tag!!!!! Click to expand... Sounds to me like you have had success now ;-) Wünsche Dir ebenfalls einen schönen Tag ;-)