0.0.4-alpha-2.1 • Published 6 months ago

capacitor-plugin-backgroundservice v0.0.4-alpha-2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

capacitor-plugin-backgroundservice

This plugin is designed to start the application as a foreground service, allowing it to run continuously in the background even if the app is killed. It also ensures the service restarts automatically when the Android device is booted or restarted.

Important Note

This plugin does not expose any explicit methods for use in JavaScript. All functionality is handled natively through Java code and configurations in the Android manifest file. You will need to set up the required native components to enable and customize the background service behavior.

Install

npm install capacitor-plugin-backgroundservice
npx cap sync

API

StartBackgroundService(...)

StartBackgroundService(options: { deviceId: string; BrokerUrl: string; username: string; password: string; topicTOSubscribe: string; topicTOpublish: string; messageTOPublish: { deviceId: string | null; message: string; }; }) => Promise<void>

Start Background Service.

ParamType
options{ deviceId: string; BrokerUrl: string; username: string; password: string; topicTOSubscribe: string; topicTOpublish: string; messageTOPublish: { deviceId: string | null; message: string; }; }

requestNotificationPermission()

requestNotificationPermission() => Promise<{ granted: boolean; }>

Request notification permissions. Requests the user's permission to send notifications.

Returns: Promise<{ granted: boolean; }>


0.0.4-alpha-1.9

6 months ago

0.0.4-alpha-1.6

6 months ago

0.0.4-alpha-1.7

6 months ago

0.0.4-alpha-1.8

6 months ago

0.0.4-alpha-2.0

6 months ago

0.0.4-alpha-2.1

6 months ago

0.0.4-alpha-1.5

6 months ago

0.0.4-alpha-1.3

6 months ago

0.0.4-alpha-1.2

7 months ago

0.0.4-alpha

7 months ago

0.0.4-alpha-1.1

7 months ago

0.0.4-alpha-1

7 months ago

0.0.3-alpha

7 months ago

0.0.3-beta

7 months ago

0.0.2

8 months ago

0.0.1

8 months ago