tags:

views:

172

answers:

1

I am trying to create a custom status bar notification in Android that has a button in addition to the text. The button can do a different thing than when you click the notification itself. Is this possible at all? I'd also be ok putting an image of a button there instead. I know how to put an image, but not sure how to handle OnClick for an image embedded in RemoteViews. Your help is sincerely appreciated.

Thanks a lot in advance.

+1  A: 

I don't think you can get a button on the status bar itself but you can certainly do it using a Custom Expanded View (see http://developer.android.com/guide/topics/ui/notifiers/notifications.html)

FixerMark
Ah. Thanks. That was actually what I meant. I am still not sure how to do it. It seems I have to use RemoteViews which doesn't have a member fun for adding a button. How do I set an OnClick for the button? Sorry if this is too newbish
There is setOnClickPendingIntent which should **in theory** allow you to trap a click on any object (including your button) but I don't seem to be able to get it to work in this application.Has anyone had any success with this function?
FixerMark