Android Question How to disable background service [solved]

Discussion in 'Android Questions' started by Didier9, Apr 29, 2019.

  1. Didier9

    Didier9 Active Member Licensed User

    I made the mistake of installing the example in

    Even though I removed the program, rebooted the phone, added this code
    Sub Activity_KeyPress( KeyCode As Int ) As Boolean ' Return True to consume the event
        If KeyCode = 4 Then ' back key
            CancelScheduledService( Me )
    End If
    Return True
    End Sub ' Activity_KeyPress()
    to hopefully cancel the service before exiting the app, it still comes back after a while.
    After exiting the app, the phone is quiet for 5-10 minutes then invariably it starts buzzing again while showing the Tracking Location event.

    How can I get rid of this thing?

  2. ronell

    ronell Well-Known Member Licensed User

    i think it should be
    CancelScheduledService(Tracker) 'service module
    instead of
    CancelScheduledService( Me ) 'activity module
    Didier9 and Erel like this.
  3. Didier9

    Didier9 Active Member Licensed User

    Thank you! Erel was right, that thing will not stop for anything :)
  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