Hello all!
I've been a member for a little over a year, so I've mainly been reading posts and tutorials. I've recently tried creating a service that would make a toast message appear every 30 seconds, as a test in concept.
When I run 'StartServiceAt' from within the Starter service, I get the following error message in the logs:
The Starter service should never be started from a receiver.
The toast message stills runs, but the log message is in red, which implies something important. I'm still new at coding, so it's entirely possible that I don't understand Starter service/Services in General completely.
Here is my code:
I've been a member for a little over a year, so I've mainly been reading posts and tutorials. I've recently tried creating a service that would make a toast message appear every 30 seconds, as a test in concept.
When I run 'StartServiceAt' from within the Starter service, I get the following error message in the logs:
The Starter service should never be started from a receiver.
The toast message stills runs, but the log message is in red, which implies something important. I'm still new at coding, so it's entirely possible that I don't understand Starter service/Services in General completely.
Here is my code:
B4X:
Sub Process_Globals
LogColor("Process_Globals being created from Starter service.", Colors.Magenta)
Dim testString As String
End Sub
Sub Service_Create
testString = "This is a test from the Starter service"
End Sub
Sub Service_Start (StartingIntent As Intent)
ToastMessageShow(testString, False)
StartServiceAt(Me, DateTime.Now + 30000, True)
End Sub