Hi,
Can I run a service completly in the background?
This is my Main:
This is my Service:
On opening the FirstTime it seems to wait till the service is done or is this incorrect? Can it start the service without waiting to complete?
BR, André
Can I run a service completly in the background?
This is my Main:
B4X:
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
StartService(Adresboek)
End If
This is my Service:
B4X:
#Region Service Attributes
#StartAtBoot: False
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim cu As ContactsUtils
End Sub
Sub Service_Create
End Sub
Sub Service_Start (StartingIntent As Intent)
Service.StopAutomaticForeground 'Call this when the background task completes (if there is one)
Vullen_Adresboek
End Sub
Sub Service_Destroy
End Sub
Sub Vullen_Adresboek
........
End Sub
On opening the FirstTime it seems to wait till the service is done or is this incorrect? Can it start the service without waiting to complete?
BR, André