clamp
clamp

Reputation: 34026

Android: how to get notified when a widget is tapped

I would like to get a notification when the user taps/clicks on a widget?

Is there something similar to onClick()?

Upvotes: 0

Views: 173

Answers (1)

Peter Knego
Peter Knego

Reputation: 80340

You must use AppWidgetProvider and register listeners there. Since in Widgets all view are created via RemoteViews you must use methods on them - e.g. setOnClickPendingIntent().

Here is a small example: http://developer.android.com/guide/topics/appwidgets/index.html#AppWidgetProvider

Upvotes: 2

Related Questions