当前位置: 动力学知识库 > 问答 > 编程问答 >

android - how to add pause/play button to notification in Lollipop?

问题描述:

I have service which plays the radio & creates a notification. The notification must incude title, text, time & a button(pause/play). I have added rest of the things & notification is getting displayed. But I'm not sure about how to add the button to the notification. On searching, I found I can use RemoteView, RemoteControlClient & MediaStyles. But RemoteControlClient & MediaStyles are used when there is a media file playing with all buttons(previous,pause,play,back). So I'm really confused about it. Can anyone suggest me, which one to use to add buttons in the notification for Lollypop.

分享给朋友:
您可能感兴趣的文章:
随机阅读: