Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not setting "sound" in presentationOptions fully disables notification sound for Android instead of just disabling it in the foreground. #2212

Open
TheProcedural opened this issue Oct 17, 2024 · 2 comments

Comments

@TheProcedural
Copy link

TheProcedural commented Oct 17, 2024

Bug Report

Plugin(s)

@capacitor/push-notifications 6.0.2

Capacitor Version

[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.
💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 6.1.2
  @capacitor/core: 6.1.2
  @capacitor/android: 6.1.2
  @capacitor/ios: 6.1.2

Installed Dependencies:

  @capacitor/cli: 6.1.2
  @capacitor/android: 6.1.2
  @capacitor/ios: 6.1.2
  @capacitor/core: 6.1.2

[success] iOS looking great! 👌
[success] Android looking great! 👌

Platform(s)

Android

Current Behavior

Only on Android disabling sound on foreground (presentationOptions) also disables it in background

Expected Behavior

To work like in iOS, no sound on foreground and sound on background. As the documentation indicates here Push notifications appearance in foreground

Code Reproduction

import { CapacitorConfig } from '@capacitor/cli'

const config: CapacitorConfig = {
  appId: 'com.example.example',
  appName: 'Example',
  webDir: 'public',
  bundledWebRuntime: false,
  plugins: {
    CapacitorCookies: {
      enabled: true,
    },
    PushNotifications: {
      presentationOptions: ['alert', 'badge'], // When "sound" is not set here it also disables sound on background on Android but works as expected on iOS
    },
  },
}

Other Technical Details

Additional Context

@Ionitron
Copy link
Collaborator

This issue needs more information before it can be addressed.
In particular, the reporter needs to provide a minimal sample app that demonstrates the issue.
If no sample app is provided within 15 days, the issue will be closed.

Please see the Contributing Guide for how to create a Sample App.

Thanks!
Ionitron 💙

@alexgerardojacinto
Copy link
Collaborator

@TheProcedural could you provide a GitHub repo with an app where the issue can be replicated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants