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

Sound not working in Android when App is Killed #250

Open
arxheji opened this issue Oct 30, 2023 · 0 comments
Open

Sound not working in Android when App is Killed #250

arxheji opened this issue Oct 30, 2023 · 0 comments

Comments

@arxheji
Copy link

arxheji commented Oct 30, 2023

The custom sound is working when app is in foreground and background but not when app is killed. iOS is working perfectly but I am having trouble debugging why the sound is not coming in Android when App is Killed!

When App is killed I only get the default sound.

I have added the mp3 file under res/raw/alert_signal.mp3 after that I followed the documentation:

android: {
    sound: 'true',
    forceShow: true,
  },

I tried this kind of payload, with both "sound" and "soundname" and each separate as well but still no luck

  data: {
    "sound": "alert_signal",
    "soundname" : "alert_signal",
  }

I also created a channel which has the custom sound:

    PushNotification.createChannel(
      () => {
        console.log('success');
      },
      () => {
        console.log('error');
      },
      {
        sound: 'alert_signal',
        id: 'Test',
        description: 'TestTest',
        importance: 5,
      }
    );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant