Event OnClick for a button in a custom notification

后端 未结 5 1607
再見小時候
再見小時候 2020-11-27 15:53

I have a custom notification with a button. To set the notification and use the event OnClick on my button I\'ve used this code:

//Notification and intent of         


        
5条回答
  •  执念已碎
    2020-11-27 16:39

    it seems that setOnClickPendingIntent doesn't work when used inside collections:

    http://developer.android.com/reference/android/widget/RemoteViews.html#setOnClickPendingIntent(int,%20android.app.PendingIntent)

    Try using setPendingIntentTemplate instead.

提交回复
热议问题