Android Question Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS

Sinan Tuzcu

Active Member
Licensed User
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
 

Sinan Tuzcu

Active Member
Licensed User
:) Erel, but this is not solution.

I need the ALWAYS otherwiese the Network Connection to server will interrupt.
 

Sinan Tuzcu

Active Member
Licensed User
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
 
Top