Hi, I am trying to start a service unsuccessfully in my app.
I can create a simple app that creates a service okay, but for some reason the code is not being called in the one I am working on.
I am calling StartService(nameOfServiceModule) in Activity_Create with Logs in the various service subs, but I am not getting anything output from the Logs in the Service (I am in the simple test app).
So part of the code is....
Main
ServiceModule (called audioPlayerService)
In the logs, I am getting the one just before StartService, but none of the Service ones.
Would there be anything anyone is aware of that would break starting a service?
I can create a simple app that creates a service okay, but for some reason the code is not being called in the one I am working on.
I am calling StartService(nameOfServiceModule) in Activity_Create with Logs in the various service subs, but I am not getting anything output from the Logs in the Service (I am in the simple test app).
So part of the code is....
Main
B4X:
Sub Activity_Create(FirstTime As Boolean)
Log("Activity_Create - About to StartService")
StartService(audioPlayerService)
ServiceModule (called audioPlayerService)
B4X:
Sub Service_Create
Log("audioPlayer - Service_Create")
End Sub
..........................
Sub Service_Start (StartingIntent As Intent)
serviceStarted = True
Log("audioPlayer - Service_Start")
Would there be anything anyone is aware of that would break starting a service?