 <p>Try it!!!!</p> <pre><code>@Override public void onReceive(Context context, Intent intent) { Notification notification = null; String action = intent.getAction(); if(action.equalsIgnoreCase("com.example.app.ACTION_PLAY")){ if(mp.isPlaying()) { notification.contentView.setViewVisibility(R.id.pause, View.INVISIBLE); notification.contentView.setViewVisibility(R.id.play, View.VISIBLE); mp.pause(); } else { notification.contentView.setViewVisibility(R.id.play, View.INVISIBLE); notification.contentView.setViewVisibility(R.id.pause, View.VISIBLE); mp.start(); } } } </code></pre>