method, which converts actions into clickable icons.</p>
<p class="note"><strong>Note:</strong> The template and the {@link android.app.Notification.Builder#addAction(android.app.Notification.Action) addAction()}
method are not included in the support library, so these features run in Android 5.0 and higher
only.</p>
<p>To display media playback controls on the lock screen in Android 5.0, set the visibility
to {@link android.support.v4.app.NotificationCompat#VISIBILITY_PUBLIC}, as described above. Then add
the actions and set the {@link android.app.Notification.MediaStyle} template, as described in the
following sample code:</p>
<pre>
Notification notification = new Notification.Builder(context)
// Show controls on lock screen even when user hides sensitive content.
.setVisibility(Notification.VISIBILITY_PUBLIC)
.setSmallIcon(R.drawable.ic_stat_player)
// Add media control buttons that invoke intents in your media service