alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 737 forks source link

addAudioPlayerStopDirective did not clear the Alexa Icon on Android notification bar #630

Closed wangyeking closed 4 years ago

wangyeking commented 4 years ago

I am using Alexa Skill for playing some MP3 files, and all works properly, but since we are not going to have a database, so we plan not to support resume intent, which means when user say stop , we should be able to totally stop the play.

but when I test via Alexa App on Android device, once I start a play via addAudioPlayerPlayDirective, there will be an notification in Android device, which let user to control resume/previous/next, but when I trigger stopintent, and addAudioPlayerStopDirective is sent to device, I found that the notication is not cleared.

ShenChen93 commented 4 years ago

Hi @wangyeking ,

If you want to let Alexa Skill totally stoped, you should close the skill session. In responseBuilder, it will close the skill session by default. But if you have the reprompt, the session will not closed. You could force to close the session with withShouldEndSession set to true.

return responseBuilder
     .speak('....')
     . withShouldEndSession(true)
     .getResponse()

Could you please try and see if it works. And share the piece of code how you handle stopIntent if it still keep the notification.

Thanks, Shen

ShenChen93 commented 4 years ago

Close this issue for now, please feel free to reopen if the problem still exist