Android Question [SOLVED] Timer already initialized ?


Well-Known Member
Licensed User
Longtime User

Again I am seeing strange things : in a service, in Service_Create I have initialized a Timer
While debugging, I have seen in the logs

1003: Object was already initialized

This turns my head on because :
  • the service was destroying itself
  • the Timer is initialized in Service_Create only
Do I have something more to learn about components life cycles ?
As a workaround I now test if the Timer is already initialized. But is it the right way to do things ?

Sub Service_Create
    If Not(TEnvoiSMS.IsInitialized) Then TEnvoiSMS.Initialize("TEnvoiSMS",DateTime.TicksPerSecond/4)
End Sub

Many thanks