Skip to content

How to communicate with native in background.js of @capacitor/background-runner #133

Description

@Lrendong

I want to automatically connect to Bluetooth and upload data after a certain period of time after the app enters the background. I found that @capacitor/background-runner can achieve this timing requirement. However, in the background.js runtime environment, there is no window or Capacitor, and other plugins such as (@capacitor-community/bluetooth-le, @capacitor/filesystem) cannot be used. So I wanted to implement it myself, but I couldn't find a way to notify the native execution of Bluetooth connection in the background.js runtime environment.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions