I'm debugging to find a bug and I have discovered this:
I have the starter_service that start another service "TestServ"
When I reboot the device, I see that the starter service is executed, but then only the Service_Start of TestServ is called, the Service_Create is missing
If I terminate the app and launch again, Now I see both Service_Create and Service Start of TestServ executed.
The missing Service_create od TestServ appear only at first boot
Is that possible or am I in tilt ?
I have the starter_service that start another service "TestServ"
B4X:
#Region Service Attributes
#StartAtBoot: true
#ExcludeFromLibrary: True
#End Region
Sub Process_Globals
Private logs As StringBuilder
Private logcat As LogCat
End Sub
Sub Service_Create
logs.Initialize
#if RELEASE
logcat.LogCatStart(Array As String("-v","raw","*:F","B4A:v"), "logcat")
#end if
End Sub
Sub Service_Start (StartingIntent As Intent)
if some_conditions then
StartServiceAt(TestServ, DateTime.Now + 5 * DateTime.TicksPerSecond, True)
End If
End Sub
When I reboot the device, I see that the starter service is executed, but then only the Service_Start of TestServ is called, the Service_Create is missing
If I terminate the app and launch again, Now I see both Service_Create and Service Start of TestServ executed.
The missing Service_create od TestServ appear only at first boot
Is that possible or am I in tilt ?