My app plays music and when users open notifications screen by swiping from the top of the screen ( or generally from the bottom right of the screen on tablets ), I want to present them a button to stop the currently playing music and start it again if they want.
I am not planning to put a widget on the user's home screen, but just into notifications. How can I do this?
Best Answer
You can create an intent for the action (in this case stop playing)and that add it as an action button to your notification.
Please refer to the Android documentation.