Custom Notification

前端 未结 2 870
后悔当初
后悔当初 2021-01-21 12:29

I would like to know if there is a way of using the notication bar in order to do some operations (onClick), without having an activity being launched/resumed.

for examp

2条回答
  •  庸人自扰
    2021-01-21 12:50

    Is there any way to implement such a thing?

    Use an appropriate PendingIntent. Instead of calling getActivity(), call getService() or getBroadcast().

提交回复
热议问题