Skip to content

Start a background sticky service that auto-restart. #2767

Description

@Pycode80

Versions

  • Python:3.9
  • OS:Debian 11
  • Kivy:2.1.0

Description

I want to start a service in the background when the user clicks on a button. I use python and KIVY and my application is for Android devices. My problem is that I want the service I run in the background to restart automatically when the phone reboots. I saw in the p4a documentation that I should put :sticky:foreground in the buildozer spec and add the permission. I've seen in the p4a documentation that you have to put :sticky:foreground in the buildozer spec and add the permission, but my service starts when I click on the button but when I restart my smartphone. It doesn't launch anymore (I don't have the notification that informs me of its presence).

buildozer.spec

:sticky:foreground
android.permission.FOREGROUND

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions