Buttons on AppWidgets beyond calling activities, how?

Put your problem here if it does not fit any of the other categories.

Buttons on AppWidgets beyond calling activities, how?

Postby charnode » Sat Mar 05, 2011 4:13 pm

Hello.

I tried to search for a solution to my problem, however all results didn't bring me to a solution. I have an AppWidget that reads a remote calendar server (XML data). I would like to have buttons on the widget to navigate daywise. To do so, I added an intent filter to my AppWidgetProvider representing the action that I would like to catch intents for. I have also created a PendingIntent containing the proper action. When I launch the emulator and click on one of the buttons, I see the following line:

"Starting activity: Intent {act=my.own.action.name flg=0x10000000 bnds=[31, 64][76, 117] (has extras) }"

Nothing else happens. Whenever I kick an Activity in there, I get the functionality but I am not able to make it happen without the activitiy showing up. So what is the best way to implement buttons on an AppWidget that do more than just a simple update or calling an activity? Or is that not possible at all? Any help would be appreciated very much.
charnode
Freshman
Freshman
 
Posts: 2
Joined: Thu Oct 07, 2010 8:43 am

Top

Re: Buttons on AppWidgets beyond calling activities, how?

Postby charnode » Sun Mar 06, 2011 6:32 am

... found out why it did not work and I thought it's worth a share. On the intent that I wrapped with the PendingIntent I used getActivity(...). Instead, of course, I have to use getBroadcast(...) to get the intent delivered to my AppWidgetProvider. Took me a while to find that one, but now it works :-)
charnode
Freshman
Freshman
 
Posts: 2
Joined: Thu Oct 07, 2010 8:43 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 20 guests