ionic-team / capacitor-plugins

Official plugins for Capacitor ⚑️
515 stars 582 forks source link

local-notifications - Android - No sound when built with shrinkResources option #2191

Open UZ8VLqifK36Z opened 2 weeks ago

UZ8VLqifK36Z commented 2 weeks ago

Bug Report

Plugin(s)

local-notifications

Capacitor Version

   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/core: 6.1.2
  @capacitor/android: 6.1.2
  @capacitor/ios: 6.1.2

[success] Android looking great! πŸ‘Œ

Platform(s)

Android

Current Behavior

Hello, I'm not sure if this is really a bug or if the documentation needs to be updated, but building with the shrinkResources option prevents sound from being played with notifications. https://developer.android.com/build/shrink-code

I have carefully checked the Capacitor documentation, but I didn't find anything warning against this build option.

Other Technical Details

Tested on virtual Android 10.0 (Google Play) and 14.0 (Google Play) β†’ no sound. Also tested on two physical devices running Android 14. One physical device gives default system sound and the other gives no sound I think the option shrinkResources delete the sound file placed in the res/raw folder.

Ionitron commented 1 week ago

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 πŸ’™