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

Cant get custom sound to work in both Android and ios #2017

Closed
iamAdamGoodman opened this issue Mar 25, 2024 · 8 comments
Closed

Cant get custom sound to work in both Android and ios #2017

iamAdamGoodman opened this issue Mar 25, 2024 · 8 comments

Comments

@iamAdamGoodman
Copy link

WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!

Provide a general summary of the issue.

Hello
Im working on an app that uses its own sound for notifications
but it does not work in both Android and IOS
Even the custom icon does not show

  • Plugin version: latest
  • Platform: Apache cordova
  • OS version:android 14 (target sdk 33)
  • Device manufacturer / model: All
  • Cordova version (```cordova -v``): 12.0.0
  • Cordova platform version (cordova platform ls): IOS / Android
  • Plugin config
  • Ionic Version (if using Ionic)

Expected Behavior

The custom sound should work
Tell us what should happen
Im using the code as it should be in the plugin documentation
Everything is working fine but not the custom sound
window.plugin.notification.local.schedule({
id: '0001',
at: new Date,
text: 'hello',
title: 'title',
badge: 1,
sound: 'file://resources/audio/beep.mp3',
autoCancel: true,
ongoing: true
});

Actual Behavior

Tell us what happens instead
sond does not work

Steps to Reproduce

Reproduce this issue; include code to reproduce, if relevant

  1. ...
  2. ...
  3. ...
  4. ....

Context

What were you trying to do?

Debug logs

Include iOS / Android logs

  • ios XCode logs
  • Android: $ adb logcat
@GitToTheHub
Copy link
Collaborator

Hi, the sound-property is not functional for Android and iOS. I updated the readme.

@iamAdamGoodman
Copy link
Author

Hi, the sound-property is not functional for Android and iOS. I updated the readme.

Hi
Is there anyway to get it work with the plugin ?)
I think that will be great as lot of people been asking how to get custom sound to work

@GitToTheHub
Copy link
Collaborator

It would be possible, but for Android it would be more tricky. There it would be only possible, by creating a channel with a sound and all notifications would have this sound when published under this channel. If you would need more sounds, you would have to create more channels, but the channels could no longer be altered, after creating them, because Android restricts this.

It would take me some time to implement this, if the user wants this.

Regards

@iamAdamGoodman
Copy link
Author

It would be possible, but for Android it would be more tricky. There it would be only possible, by creating a channel with a sound and all notifications would have this sound when published under this channel. If you would need more sounds, you would have to create more channels, but the channels could no longer be altered, after creating them, because Android restricts this.

It would take me some time to implement this, if the user wants this.

Regards

I think that would be great and so helpful for developers .
So if you can do it , that will be good .
Thanks

@GitToTheHub
Copy link
Collaborator

I will see if the users support me then i will see if i can add it.

@iamAdamGoodman
Copy link
Author

I will see if the users support me then i will see if i can add it.

How to support ?

@GitToTheHub
Copy link
Collaborator

GitToTheHub commented Aug 18, 2024 via email

@iamAdamGoodman
Copy link
Author

I mean if they would sponsor me: https://github.com/sponsors/GitToTheHub But currently i have first to finish some other projects

________________________________ Von: iamAdamGoodman @.> Gesendet: Sunday, August 18, 2024 1:43:08 PM An: katzer/cordova-plugin-local-notifications @.> Cc: Manuel Beck @.>; State change @.> Betreff: Re: [katzer/cordova-plugin-local-notifications] Cant get custom sound to work in both Android and ios (Issue #2017) I will see if the users support me then i will see if i can add it. How to support ? — Reply to this email directly, view it on GitHub<#2017 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADIWBXIOFA7HRARBVM2GHNDZSCCEZAVCNFSM6AAAAABFHB3YWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGIZTCMZXGA. You are receiving this because you modified the open/close state.Message ID: @.***>

No problem

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

2 participants