Android Question Services Destroyed

Discussion in 'Android Questions' started by Scantech, May 21, 2019.

  1. Scantech

    Scantech Well-Known Member Licensed User

    I am trying to figure out why my services got destroyed when i used the GPS Example.

    I get Debug Logs and this is what i noticed
    My Communication Service has
    Code:
    Sub Service_Create
        
    Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_NEVER 'we are handling it ourselves
        
        Timer_RequestOBD.Initialize (
    "Timer_RequestOBD"20)
        Timer_Timeout.Initialize    (
    "Timer_Timeout",    3000)
        
        tmrKeepAliveService.Initialize(
    "tmrKeepAliveService"5000)
        tmrKeepAliveService.Enabled = 
    True
        
        Starter.pws.PartialLock

    End Sub
    Code:
    Sub Service_Start (StartingIntent As Intent)
    '    Service.StopAutomaticForeground 'Call this when the background task completes (if there is one)
        Service.StartForeground(1, CreateNotification("..."))
        tmrKeepAliveService_Tick
    End Sub
    Any reason for this??
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Do you see the foreground icon when it is destroyed?
     
  3. Scantech

    Scantech Well-Known Member Licensed User

    I don't know. The log was from a anonymous customer.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Peter Simpson and Scantech like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice