How to put media controller button on notification bar?
问题 I am creating a music player application. I want to show the media controller on notification bar while my application is running in background. It looks like Google player. How to do this? 回答1: For getting media player controller in your app simply follow this: Call this method in your MainActivity public void showNotification(View view){ new MyNotification(this); finish(); } Create a new MynotificationClass public class MyNotification extends Notification { private Context ctx; private