Android Question Background services


Active Member
Licensed User
Longtime User
Hi all

I have been playing with Erels Websocket push .

And i have noticed som difference in what phones i use.
When i use my newest Huawei P20 ( android 8.0.0) everything works as expected.
But on another device running Android 7.1.2 it does not work the same way .

The problem is the service module the stops working .
I have in the service module :

#Region  Service Attributes
    #StartAtBoot: true
#End Region

And i have been trying different : Service.XXXX in Service_Start

If i use :
StartServiceAt(Me, DateTime.Now + 2 * DateTime.TicksPerMinute, False)
Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS

Then it seems to work okey , but i get a notificaton sound everytime the services is restarted.
wich is enoying .
Can u disable that sound ?

Or is there another way to keep the service alive ?


Licensed User
Longtime User
Upvote 0