Sinan Tuzcu Well-Known Member Licensed User Longtime User Mar 16, 2019 #1 Hello, is it possible to use this code in Service_Create Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS without Notification on display? Because, I want use only NB6 thanks in advanced Sinan
Hello, is it possible to use this code in Service_Create Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS without Notification on display? Because, I want use only NB6 thanks in advanced Sinan
Erel B4X founder Staff member Licensed User Longtime User Mar 17, 2019 #2 Set it to NEVER instead of ALWAYS. Upvote 0
Sinan Tuzcu Well-Known Member Licensed User Longtime User Mar 17, 2019 #3 Erel, but this is not solution. I need the ALWAYS otherwiese the Network Connection to server will interrupt. Upvote 0
Erel, but this is not solution. I need the ALWAYS otherwiese the Network Connection to server will interrupt.
Erel B4X founder Staff member Licensed User Longtime User Mar 17, 2019 #4 This is part of the solution. Set it to NEVER and create your own notification and call Service.StartForeground. Example: https://www.b4x.com/android/forum/threads/background-location-tracking.99873/#content Upvote 0
This is part of the solution. Set it to NEVER and create your own notification and call Service.StartForeground. Example: https://www.b4x.com/android/forum/threads/background-location-tracking.99873/#content
Sinan Tuzcu Well-Known Member Licensed User Longtime User Mar 17, 2019 #5 Hi Erel, I have do that, but the next problem in this case is than, that ICON will not shows and the default text will shows only (Name of App) B4X: Sub Service_Create Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_NEVER Dim n As Notification n.Initialize n.Icon = "icon" n.Vibrate = False n.Sound = False n.Light = False n.SetInfo("Hallo Welt", "Connected" & Variablen.Modul_Name,Vorlage_01) Service.StartForeground(1,n) lock.PartialLock End Sub Upvote 0
Hi Erel, I have do that, but the next problem in this case is than, that ICON will not shows and the default text will shows only (Name of App) B4X: Sub Service_Create Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_NEVER Dim n As Notification n.Initialize n.Icon = "icon" n.Vibrate = False n.Sound = False n.Light = False n.SetInfo("Hallo Welt", "Connected" & Variablen.Modul_Name,Vorlage_01) Service.StartForeground(1,n) lock.PartialLock End Sub
Erel B4X founder Staff member Licensed User Longtime User Mar 18, 2019 #6 Your notification should show. Maybe you are seeing a different notification created from a different service. Upvote 0
Your notification should show. Maybe you are seeing a different notification created from a different service.