Android Question Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS

Sinan Tuzcu

Well-Known Member
Licensed User
Longtime 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

Well-Known Member
Licensed User
Longtime User
:) Erel, but this is not solution.

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

Sinan Tuzcu

Well-Known Member
Licensed User
Longtime 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
 
Upvote 0
Top