Skip to content

How to reconnect to foreground service after app is closed #365

Open

Description

@AlastairOZ

Can you provide an example or work flow on how to reconnect to the foreground service once the main app is closed.
I am using version 9.1.0

With thanks.

Activity

  1. monfadev commented on Nov 3, 2025

    @monfadev
  2. AlastairOZ commented on Dec 7, 2025

    @AlastairOZ
    Author

    Perhaps I should rephrase the question:
    Can you provide an example or work flow on how to reconnect to the foreground service once the main app is killed and then restarted.
    For instance, the user kills running apps, the foreground service is still running. Then when the app is restarted, I would like to connect to the same running foreground service.

  3. monfadev commented on Dec 10, 2025

    @monfadev

    when the device restarted, you wanna run FGS again right? lets explore about boot

  4. AlastairOZ commented on Dec 15, 2025

    @AlastairOZ
    Author

    No, I am need to know how to re-connect to the foreground service once the has been killed, then restarted. I need to reconnect to the same FGS not a new one. Nothing to do with restarting/booting the device.
    There are two options with the FSG.

    1. to kill the service when the app is closed completely, (killed) or:
    2. leave the service running to complete tasks.

    I would like to keep the service running even if the user kills the app, I am having trouble with reconnecting to the same running service in the above situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions