Android notification with buttons on it
问题 I'm trying to make a notification with 2 buttons on it: one takes me back to the activity the other closes it Has anyone got an idea on how to catch the button click event (remember that the Activity is paused)? 回答1: I am glad to post it! After working all night I found something. So, here we go! 1. Create an xml layout file for your notification. 2. Create the notification using the Notification.Builder. After adding everything you want (icons, sounds, etc) do this: //R.layout.notification