title: How to call any class function on click of android widget button?
body: <p>I have defined an App Widget (<code>AppWidgetProvider</code>, etc.), and I want to write an ad hoc program for the <code>onClick</code> of one of the buttons in the App Widget. The documentation describes how to inflate a layout for the App Widget and how to set a particular action on a button (see <code>RemoteViews.setOnClickPendingIntent()</code>), but I don't see a way to write an ad hoc <code>OnClickListener</code>() for the button in the way that we do for buttons in Activities.</p>