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 able to change sound and update badge count in android? #1108

Open
saikiranoptisol opened this issue Apr 2, 2019 · 0 comments
Open

Comments

@saikiranoptisol
Copy link

I have gone through most of the issues, still the solution that i need is cant able to get. As per my requirement in payload we are sending a sound param. below is the payload that is sending to me
message ={
to:to,
badge : count,
"notification" : {
"body" : body,
"icon" : "ic_launcher",
"sound": "blank.mp3",
"badge": count
},
"data" : {
"body" : body,
"icon" : "ic_launcher",
"sound": "blank.mp3",
"badge": count
},
}

what ever the sound name i mention. it is displaying only default sound in Android. in IOS both the sound and badge count update works fine. As per the doccument for android we need to use custom_notification. I tried even that.
message = {
data:{
custom_notification:{
"body" : body,
"icon" : "ic_launcher",
"sound": "blank.mp3",
"badge": count
}
}
}.

if i try like this. in foreground i can able to receive notification but not notification banner. log is printing when i receive notification. but in background and killed state nothing happening. Kindly help i struck with sound change from a long time.
Note : i have added my sound file raw folder correctly.

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