Skip to content

Commit

Permalink
fix(android-foreground-service): serviceType property was ignored (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz authored Feb 5, 2025
1 parent 39836b3 commit 82a40ba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/quiet-apes-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@capawesome-team/capacitor-android-foreground-service': patch
---

fix(android): `serviceType` property was ignored
6 changes: 6 additions & 0 deletions packages/android-foreground-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,12 @@ Remove all listeners for this plugin.

</docgen-api>

## FAQ

### Why can the user dismiss the notification?

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

See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/android-foreground-service/CHANGELOG.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
String title = notificationBundle.getString("title");
boolean silent = notificationBundle.getBoolean("silent", false);
ArrayList<Bundle> buttonsBundle = notificationBundle.getParcelableArrayList("buttons");
int serviceType = extras.getInt("serviceType");
int serviceType = notificationBundle.getInt("serviceType", 0);

PendingIntent contentIntent = buildContentIntent(id);
Notification.Builder builder;
Expand Down

0 comments on commit 82a40ba

Please sign in to comment.