I am a newbie in Android development and I am faced with a problem which I can't figure out. I am following this link. It is a simple widget which has a listView which shows harcoded feed.
I wanted to make the widget interactive. So I came up with a solution as follows: I created a Intent
, associated with it a Action and Broadcasted it with PendingIntent
. Now I tried to catch that Intent
in the onReceive()
function of the WidgetProvider.java
class.
I thought this approach is great except the fact that onUpdate function is called every 30 minutes. I am not sure even if it works after 30 minutes, haven't tried it. So I can't figure out how do I achieve this.
Basically I wanted to make it into widget, on which if clicked, it launches another activity. And can you also tell when is the onReceive function of the AppWidgetProvider called.