mercredi 4 juin 2014

How to make ListView clickable in android Widget?


Vote count:

0




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 acheive 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.


Please do let me know if you require anymore Information. I urgently need to resolve this. Please help. Thanks.



asked 24 secs ago






Aucun commentaire:

Enregistrer un commentaire