---
description: Capacitor plugin to run a foreground service on Android. It allows apps to perform tasks in the background with notifications and manage overlay permissions.
title: Capacitor Android Foreground Service Plugin for Android - Capawesome
image: https://capawesome.io/docs/assets/images/social/plugins/android-foreground-service.png
---

[ Skip to content](#capawesome-teamcapacitor-android-foreground-service) 

[ 🎉 Introducing **Capawesome Platform** — one platform for Live Updates, Native Builds, App Store Publishing, and Insider SDKs.](https://capawesome.io) 

* [  Configuration ](#configuration)
* [  Demo ](#demo)
* [  Usage ](#usage)
* [  API ](#api)
* [  Type Aliases ](#type-aliases)
* [  Enums ](#enums)
* [  FAQ ](#faq)
* [  Changelog ](#changelog)
* [  License ](#license)
* [  App Review ](/docs/plugins/app-review/)
* [  App Shortcuts ](/docs/plugins/app-shortcuts/)
* [  App Update ](/docs/plugins/app-update/)
* [  Apple Sign-In ](/docs/plugins/apple-sign-in/)
* [  Asset Manager ](/docs/plugins/asset-manager/)
* [  Audio Player ](/docs/plugins/audio-player/)
* [  Audio Recorder ](/docs/plugins/audio-recorder/)
* [  Background Task ](/docs/plugins/background-task/)
* [  Badge ](/docs/plugins/badge/)
* [  Barometer ](/docs/plugins/barometer/)
* [  Biometrics ](/docs/plugins/biometrics/)
* [  Bluetooth Low Energy ](/docs/plugins/bluetooth-low-energy/)
* [  Cloudinary ](/docs/plugins/cloudinary/)
* [  Contacts ](/docs/plugins/contacts/)
* [  Datetime Picker ](/docs/plugins/datetime-picker/)
* [  File Compressor ](/docs/plugins/file-compressor/)
* [  File Opener ](/docs/plugins/file-opener/)
* [  File Picker ](/docs/plugins/file-picker/)
* [  Firebase ](/docs/plugins/firebase/)
* [  Formbricks ](/docs/plugins/formbricks/)
* [  Geocoder ](/docs/plugins/geocoder/)
* [  Google Sign-In ](/docs/plugins/google-sign-in/)
* [  libSQL ](/docs/plugins/libsql/)
* [  Live Update ](/docs/plugins/live-update/)
* [  Managed Configurations ](/docs/plugins/managed-configurations/)
* [  Media Session ](/docs/plugins/media-session/)
* [  ML Kit ](/docs/plugins/mlkit/)
* [  NFC ](/docs/plugins/nfc/)
* [  OAuth ](/docs/plugins/oauth/)
* [  Pedometer ](/docs/plugins/pedometer/)
* [  Photo Editor ](/docs/plugins/photo-editor/)
* [  PostHog ](/docs/plugins/posthog/)
* [  Printer ](/docs/plugins/printer/)
* [  Purchases ](/docs/plugins/purchases/)
* [  RealtimeKit ](/docs/plugins/realtimekit/)
* [  Screen Orientation ](/docs/plugins/screen-orientation/)
* [  Screenshot ](/docs/plugins/screenshot/)
* [  Secure Preferences ](/docs/plugins/secure-preferences/)
* [  Speech Recognition ](/docs/plugins/speech-recognition/)
* [  Speech Synthesis ](/docs/plugins/speech-synthesis/)
* [  Share Target ](/docs/plugins/share-target/)
* [  Square Mobile Payments ](/docs/plugins/square-mobile-payments/)
* [  SQLite ](/docs/plugins/sqlite/)
* [  Superwall ](/docs/plugins/superwall/)
* [  Torch ](/docs/plugins/torch/)
* [  Wifi ](/docs/plugins/wifi/)
* [  Zip ](/docs/plugins/zip/)
* [  Cloud ](/docs/cloud/)
* [  Live Updates ](/docs/cloud/live-updates/)
* Advanced
* Integrations
* [  Native Builds ](/docs/cloud/native-builds/)
* [  Configuration ](/docs/cloud/native-builds/configuration/)
* [  Environments ](/docs/cloud/native-builds/environments/)
* Guides
* [  Sample Projects ](/docs/cloud/native-builds/sample-projects/)
* [  Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [  Automations ](/docs/cloud/automations/)
* [  Assist ](/docs/cloud/assist/)
* Account
* Organizations
* [  Organization and User Management ](/docs/cloud/organizations/memberships/)
* [  Single Sign-On (SSO) ](/docs/cloud/organizations/sso/)
* [  Teams ](/docs/cloud/organizations/teams/)
* [  Two-Factor Authentication ](/docs/cloud/organizations/two-factor-authentication/)
* [  Integrations ](/docs/cloud/integrations/)
* [  License Keys ](/docs/cloud/license-keys/)
* [  Webhooks ](/docs/cloud/webhooks/)
* [  Pricing ](https://capawesome.io/pricing/)
* [  FAQ ](/docs/cloud/faq/)
* [  Support ](/docs/cloud/support/)
* [  Contributing ](/docs/contributing/)
* [  LLMs ](/docs/llms/)
* [  Insiders ](/docs/insiders/)
* [  License ](https://capawesome.io/legal/eula/)
* [  Support ](/docs/insiders/support/)
* [  FAQ ](/docs/insiders/faq/)
* [  Blog ](/blog/)
* Categories

* [  Configuration ](#configuration)
* [  Demo ](#demo)
* [  Usage ](#usage)
* [  API ](#api)
* [  Type Aliases ](#type-aliases)
* [  Enums ](#enums)
* [  FAQ ](#faq)
* [  Changelog ](#changelog)
* [  License ](#license)

# @capawesome-team/capacitor-android-foreground-service[¶](#capawesome-teamcapacitor-android-foreground-service "Permanent link")

Capacitor plugin to run a foreground service on Android.

[ ![Deliver Live Updates to your Capacitor app with Capawesome Cloud](../../assets/external/cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.69628c3f.png) ](https://cloud.capawesome.io/) 

## Newsletter[¶](#newsletter "Permanent link")

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).

## Compatibility[¶](#compatibility "Permanent link")

| Plugin Version | Capacitor Version | Status         |
| -------------- | ----------------- | -------------- |
| 8.x.x          | \>=8.x.x          | Active support |

## Installation[¶](#installation "Permanent link")

You can use our **AI-Assisted Setup** to install the plugin. Add the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:

`[](#%5F%5Fcodelineno-0-1)npx skills add capawesome-team/skills --skill capacitor-plugins
`

Then use the following prompt:

`` [](#%5F%5Fcodelineno-1-1)Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome-team/capacitor-android-foreground-service` plugin in my project.
 ``

If you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:

`[](#%5F%5Fcodelineno-2-1)npm install @capawesome-team/capacitor-android-foreground-service
[](#%5F%5Fcodelineno-2-2)npx cap sync
`

### Android[¶](#android "Permanent link")

This API requires the following permissions be added to your `AndroidManifest.xml` before or after the `application` tag:

`[](#%5F%5Fcodelineno-3-1)<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
[](#%5F%5Fcodelineno-3-2)<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
[](#%5F%5Fcodelineno-3-3)<!-- Required to keep the app running in the background without any ressource limitations -->
[](#%5F%5Fcodelineno-3-4)<uses-permission android:name="android.permission.WAKE_LOCK" />
[](#%5F%5Fcodelineno-3-5)<!-- Required to request the manage overlay permission -->
[](#%5F%5Fcodelineno-3-6)<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
`

**Attention**: Replace `FOREGROUND_SERVICE_LOCATION` with the foreground service types you want to use (see [Foreground service types](https://developer.android.com/develop/background-work/services/fg-service-types)). See [ServiceType](#servicetype) for the available types.

You also need to add the following receiver and service **inside** the `application` tag in your `AndroidManifest.xml`:

`[](#%5F%5Fcodelineno-4-1)<receiver android:name="io.capawesome.capacitorjs.plugins.foregroundservice.NotificationActionBroadcastReceiver" />
[](#%5F%5Fcodelineno-4-2)<service android:name="io.capawesome.capacitorjs.plugins.foregroundservice.AndroidForegroundService" android:foregroundServiceType="location" />
`

**Attention**: Replace `location` with the foreground service types you want to use (see [Foreground service types](https://developer.android.com/develop/background-work/services/fg-service-types)). See [ServiceType](#servicetype) for the available types.

## Configuration[¶](#configuration "Permanent link")

No configuration required for this plugin.

## Demo[¶](#demo "Permanent link")

A working example can be found here: [robingenz/capacitor-plugin-demo](https://github.com/robingenz/capacitor-plugin-demo)

| Android                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------ |
| ![Android Demo](../../assets/external/user-images.githubusercontent.com/13857929/188438969-fcbf02d3-0db2-4277-8039-ddfb6bce42ae.gif) |

## Usage[¶](#usage "Permanent link")

`[](#%5F%5Fcodelineno-5-1)import { Capacitor } from '@capacitor/core';
[](#%5F%5Fcodelineno-5-2)import { ForegroundService } from '@capawesome-team/capacitor-android-foreground-service';
[](#%5F%5Fcodelineno-5-3)
[](#%5F%5Fcodelineno-5-4)const startForegroundService = async () => {
[](#%5F%5Fcodelineno-5-5)  await ForegroundService.startForegroundService({
[](#%5F%5Fcodelineno-5-6)    id: 1,
[](#%5F%5Fcodelineno-5-7)    title: 'Title',
[](#%5F%5Fcodelineno-5-8)    body: 'Body',
[](#%5F%5Fcodelineno-5-9)    smallIcon: 'ic_stat_icon_config_sample',
[](#%5F%5Fcodelineno-5-10)    buttons: [
[](#%5F%5Fcodelineno-5-11)      {
[](#%5F%5Fcodelineno-5-12)        title: 'Button 1',
[](#%5F%5Fcodelineno-5-13)        id: 1,
[](#%5F%5Fcodelineno-5-14)      },
[](#%5F%5Fcodelineno-5-15)      {
[](#%5F%5Fcodelineno-5-16)        title: 'Button 2',
[](#%5F%5Fcodelineno-5-17)        id: 2,
[](#%5F%5Fcodelineno-5-18)      },
[](#%5F%5Fcodelineno-5-19)    ],
[](#%5F%5Fcodelineno-5-20)    silent: false,
[](#%5F%5Fcodelineno-5-21)    notificationChannelId: 'default',
[](#%5F%5Fcodelineno-5-22)  });
[](#%5F%5Fcodelineno-5-23)};
[](#%5F%5Fcodelineno-5-24)
[](#%5F%5Fcodelineno-5-25)const updateForegroundService = async () => {
[](#%5F%5Fcodelineno-5-26)  await ForegroundService.updateForegroundService({
[](#%5F%5Fcodelineno-5-27)    id: 1,
[](#%5F%5Fcodelineno-5-28)    title: 'Title',
[](#%5F%5Fcodelineno-5-29)    body: 'Body',
[](#%5F%5Fcodelineno-5-30)    smallIcon: 'ic_stat_icon_config_sample',
[](#%5F%5Fcodelineno-5-31)  });
[](#%5F%5Fcodelineno-5-32)};
[](#%5F%5Fcodelineno-5-33)
[](#%5F%5Fcodelineno-5-34)const stopForegroundService = async () => {
[](#%5F%5Fcodelineno-5-35)  await ForegroundService.stopForegroundService();
[](#%5F%5Fcodelineno-5-36)};
[](#%5F%5Fcodelineno-5-37)
[](#%5F%5Fcodelineno-5-38)const createNotificationChannel = async () => {
[](#%5F%5Fcodelineno-5-39)  await ForegroundService.createNotificationChannel({
[](#%5F%5Fcodelineno-5-40)    id: 'default',
[](#%5F%5Fcodelineno-5-41)    name: 'Default',
[](#%5F%5Fcodelineno-5-42)    description: 'Default channel',
[](#%5F%5Fcodelineno-5-43)    importance: Importance.Default,
[](#%5F%5Fcodelineno-5-44)  });
[](#%5F%5Fcodelineno-5-45)};
[](#%5F%5Fcodelineno-5-46)
[](#%5F%5Fcodelineno-5-47)const deleteNotificationChannel = async () => {
[](#%5F%5Fcodelineno-5-48)  await ForegroundService.deleteNotificationChannel({
[](#%5F%5Fcodelineno-5-49)    id: 'default',
[](#%5F%5Fcodelineno-5-50)  });
[](#%5F%5Fcodelineno-5-51)};
`

## API[¶](#api "Permanent link")

* [moveToForeground()](#movetoforeground)
* [startForegroundService(...)](#startforegroundservice)
* [updateForegroundService(...)](#updateforegroundservice)
* [stopForegroundService()](#stopforegroundservice)
* [checkPermissions()](#checkpermissions)
* [requestPermissions()](#requestpermissions)
* [checkManageOverlayPermission()](#checkmanageoverlaypermission)
* [requestManageOverlayPermission()](#requestmanageoverlaypermission)
* [createNotificationChannel(...)](#createnotificationchannel)
* [deleteNotificationChannel(...)](#deletenotificationchannel)
* [addListener('buttonClicked', ...)](#addlistenerbuttonclicked-)
* [addListener('notificationTapped', ...)](#addlistenernotificationtapped-)
* [removeAllListeners()](#removealllisteners)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)
* [Enums](#enums)

### moveToForeground()[¶](#movetoforeground "Permanent link")

`[](#%5F%5Fcodelineno-6-1)moveToForeground() => Promise<void>
`

Moves the app to the foreground.

On Android SDK 23+, the user must grant the manage overlay permission. You can use the `requestManageOverlayPermission()` method to request the permission and the `checkManageOverlayPermission()` method to check if the permission is granted.

Only available on Android.

**Since:** 0.3.0

---

### startForegroundService(...)[¶](#startforegroundservice "Permanent link")

`[](#%5F%5Fcodelineno-7-1)startForegroundService(options: StartForegroundServiceOptions) => Promise<void>
`

Starts the foreground service.

Only available on Android.

| Param       | Type                                                            |
| ----------- | --------------------------------------------------------------- |
| **options** | [StartForegroundServiceOptions](#startforegroundserviceoptions) |

**Since:** 0.0.1

---

### updateForegroundService(...)[¶](#updateforegroundservice "Permanent link")

`[](#%5F%5Fcodelineno-8-1)updateForegroundService(options: UpdateForegroundServiceOptions) => Promise<void>
`

Updates the notification details of the running foreground service.

Only available on Android.

| Param       | Type                                                            |
| ----------- | --------------------------------------------------------------- |
| **options** | [StartForegroundServiceOptions](#startforegroundserviceoptions) |

**Since:** 6.1.0

---

### stopForegroundService()[¶](#stopforegroundservice "Permanent link")

`[](#%5F%5Fcodelineno-9-1)stopForegroundService() => Promise<void>
`

Stops the foreground service.

Only available on Android.

**Since:** 0.0.1

---

### checkPermissions()[¶](#checkpermissions "Permanent link")

`[](#%5F%5Fcodelineno-10-1)checkPermissions() => Promise<PermissionStatus>
`

Check permission to display notifications.

On **Android**, this method only needs to be called on Android 13+.

Only available on Android.

**Returns:** `Promise<[PermissionStatus](#permissionstatus)>`

**Since:** 5.0.0

---

### requestPermissions()[¶](#requestpermissions "Permanent link")

`[](#%5F%5Fcodelineno-11-1)requestPermissions() => Promise<PermissionStatus>
`

Request permission to display notifications.

On **Android**, this method only needs to be called on Android 13+.

Only available on Android.

**Returns:** `Promise<[PermissionStatus](#permissionstatus)>`

**Since:** 5.0.0

---

### checkManageOverlayPermission()[¶](#checkmanageoverlaypermission "Permanent link")

`[](#%5F%5Fcodelineno-12-1)checkManageOverlayPermission() => Promise<ManageOverlayPermissionResult>
`

Check if the overlay permission is granted.

Only available on Android.

**Returns:** `Promise<[ManageOverlayPermissionResult](#manageoverlaypermissionresult)>`

**Since:** 0.3.0

---

### requestManageOverlayPermission()[¶](#requestmanageoverlaypermission "Permanent link")

`[](#%5F%5Fcodelineno-13-1)requestManageOverlayPermission() => Promise<ManageOverlayPermissionResult>
`

Request the manage overlay permission.

Only available on Android.

**Returns:** `Promise<[ManageOverlayPermissionResult](#manageoverlaypermissionresult)>`

**Since:** 0.3.0

---

### createNotificationChannel(...)[¶](#createnotificationchannel "Permanent link")

`[](#%5F%5Fcodelineno-14-1)createNotificationChannel(options: CreateNotificationChannelOptions) => Promise<void>
`

Create a notification channel. If not invoked, the plugin creates a channel with name and description set to "Default".

Only available for Android (SDK 26+).

| Param       | Type                                                                  |
| ----------- | --------------------------------------------------------------------- |
| **options** | [CreateNotificationChannelOptions](#createnotificationchanneloptions) |

**Since:** 6.1.0

---

### deleteNotificationChannel(...)[¶](#deletenotificationchannel "Permanent link")

`[](#%5F%5Fcodelineno-15-1)deleteNotificationChannel(options: DeleteNotificationChannelOptions) => Promise<void>
`

Delete a notification channel.

Only available for Android (SDK 26+).

| Param       | Type                                                                  |
| ----------- | --------------------------------------------------------------------- |
| **options** | [DeleteNotificationChannelOptions](#deletenotificationchanneloptions) |

**Since:** 6.1.0

---

### addListener('buttonClicked', ...)[¶](#addlistenerbuttonclicked "Permanent link")

`[](#%5F%5Fcodelineno-16-1)addListener(eventName: 'buttonClicked', listenerFunc: ButtonClickedEventListener) => Promise<PluginListenerHandle>
`

Called when a notification button is clicked.

Only available on iOS.

| Param            | Type                                                      |
| ---------------- | --------------------------------------------------------- |
| **eventName**    | 'buttonClicked'                                           |
| **listenerFunc** | [ButtonClickedEventListener](#buttonclickedeventlistener) |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.2.0

---

### addListener('notificationTapped', ...)[¶](#addlistenernotificationtapped "Permanent link")

`[](#%5F%5Fcodelineno-17-1)addListener(eventName: 'notificationTapped', listenerFunc: NotificationTappedEventListener) => Promise<PluginListenerHandle>
`

Called when the foreground service notification is tapped.

Only available on Android.

| Param            | Type                                                                |
| ---------------- | ------------------------------------------------------------------- |
| **eventName**    | 'notificationTapped'                                                |
| **listenerFunc** | [NotificationTappedEventListener](#notificationtappedeventlistener) |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 8.1.0

---

### removeAllListeners()[¶](#removealllisteners "Permanent link")

`[](#%5F%5Fcodelineno-18-1)removeAllListeners() => Promise<void>
`

Remove all listeners for this plugin.

**Since:** 0.2.0

---

### Interfaces[¶](#interfaces "Permanent link")

#### StartForegroundServiceOptions[¶](#startforegroundserviceoptions "Permanent link")

| Prop                      | Type                        | Description                                                                                                                                                                                                   | Default | Since |
| ------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ----- |
| **body**                  | string                      | The body of the notification, shown below the title.                                                                                                                                                          | 0.0.1   |       |
| **buttons**               | NotificationButton\[\]      | The buttons to show on the notification. Only available on Android (SDK 24+).                                                                                                                                 | 0.2.0   |       |
| **id**                    | number                      | The notification identifier.                                                                                                                                                                                  | 0.0.1   |       |
| **serviceType**           | [ServiceType](#servicetype) | The foreground service type. Only available on Android (SDK 29+).                                                                                                                                             | 6.2.0   |       |
| **smallIcon**             | string                      | The status bar icon for the notification. Icons should be placed in your app's res/drawable folder. The value for this option should be the drawable resource ID, which is the filename without an extension. | 0.0.1   |       |
| **title**                 | string                      | The title of the notification.                                                                                                                                                                                | 0.0.1   |       |
| **silent**                | boolean                     | If true, will only alert (sound/vibration) on the first notification. Subsequent updates will be silent.                                                                                                      | false   | 6.1.0 |
| **notificationChannelId** | string                      | The notification channel identifier.                                                                                                                                                                          | 6.1.0   |       |

#### NotificationButton[¶](#notificationbutton "Permanent link")

| Prop      | Type   | Description                                                                                         | Since |
| --------- | ------ | --------------------------------------------------------------------------------------------------- | ----- |
| **title** | string | The button title.                                                                                   | 0.2.0 |
| **id**    | number | The button identifier. This is used to identify the button when the buttonClicked event is emitted. | 0.2.0 |

#### PermissionStatus[¶](#permissionstatus "Permanent link")

| Prop        | Type                                | Description                                   | Since |
| ----------- | ----------------------------------- | --------------------------------------------- | ----- |
| **display** | [PermissionState](#permissionstate) | Permission state of displaying notifications. | 5.0.0 |

#### ManageOverlayPermissionResult[¶](#manageoverlaypermissionresult "Permanent link")

| Prop        | Type    | Description                                                                 | Since |
| ----------- | ------- | --------------------------------------------------------------------------- | ----- |
| **granted** | boolean | Whether the permission is granted. This is always true on Android SDK < 23. | 0.3.0 |

#### CreateNotificationChannelOptions[¶](#createnotificationchanneloptions "Permanent link")

| Prop            | Type                      | Description                                                         | Since |
| --------------- | ------------------------- | ------------------------------------------------------------------- | ----- |
| **description** | string                    | The description of this channel (presented to the user).            | 6.1.0 |
| **id**          | string                    | The channel identifier.                                             | 6.1.0 |
| **importance**  | [Importance](#importance) | The level of interruption for notifications posted to this channel. | 6.1.0 |
| **name**        | string                    | The name of this channel (presented to the user).                   | 6.1.0 |

#### DeleteNotificationChannelOptions[¶](#deletenotificationchanneloptions "Permanent link")

| Prop   | Type   | Description             | Since |
| ------ | ------ | ----------------------- | ----- |
| **id** | string | The channel identifier. | 6.1.0 |

#### PluginListenerHandle[¶](#pluginlistenerhandle "Permanent link")

| Prop       | Type                |
| ---------- | ------------------- |
| **remove** | () => Promise<void> |

#### ButtonClickedEvent[¶](#buttonclickedevent "Permanent link")

| Prop         | Type   | Description            | Since |
| ------------ | ------ | ---------------------- | ----- |
| **buttonId** | number | The button identifier. | 0.2.0 |

#### NotificationTappedEvent[¶](#notificationtappedevent "Permanent link")

| Prop               | Type   | Description                  | Since |
| ------------------ | ------ | ---------------------------- | ----- |
| **notificationId** | number | The notification identifier. | 8.1.0 |

### Type Aliases[¶](#type-aliases "Permanent link")

#### UpdateForegroundServiceOptions[¶](#updateforegroundserviceoptions "Permanent link")

`[StartForegroundServiceOptions](#startforegroundserviceoptions)`

#### PermissionState[¶](#permissionstate "Permanent link")

`'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'`

#### ButtonClickedEventListener[¶](#buttonclickedeventlistener "Permanent link")

`(event: [ButtonClickedEvent](#buttonclickedevent)): void`

#### NotificationTappedEventListener[¶](#notificationtappedeventlistener "Permanent link")

`(event: [NotificationTappedEvent](#notificationtappedevent)): void`

### Enums[¶](#enums "Permanent link")

#### ServiceType[¶](#servicetype "Permanent link")

| Members        | Value | Description                                                                                     | Since |
| -------------- | ----- | ----------------------------------------------------------------------------------------------- | ----- |
| **Location**   | 8     | Long-running use cases that require location access, such as navigation and location sharing.   | 6.2.0 |
| **Microphone** | 128   | Continue microphone capture from the background, such as voice recorders or communication apps. | 6.2.0 |

#### Importance[¶](#importance "Permanent link")

| Members     | Value | Since |
| ----------- | ----- | ----- |
| **Min**     | 1     | 6.1.0 |
| **Low**     | 2     | 6.1.0 |
| **Default** | 3     | 6.1.0 |
| **High**    | 4     | 6.1.0 |
| **Max**     | 5     | 6.1.0 |

## FAQ[¶](#faq "Permanent link")

### Why can the user dismiss the notification?[¶](#why-can-the-user-dismiss-the-notification "Permanent link")

Android 14 has changed the behavior to allow users to dismiss such notifications, see [Changes to how users experience non-dismissible notifications](https://developer.android.com/about/versions/14/behavior-changes-all#non-dismissable-notifications).

## Changelog[¶](#changelog "Permanent link")

See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/android-foreground-service/CHANGELOG.md).

## License[¶](#license "Permanent link")

See [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/android-foreground-service/LICENSE).

May 17, 2026 

 Back to top 