Listing 1013 Listening for Intent broacasts within App Widgets Available for

downloadon <receiver android:name=".MyAppWidget" android:label="My App Widget"> Wrox.com <intent-filter>

<action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> </intent-filter> <intent-filter>

<action android:name="com.paad.chapter9.FORCE_WIDGET_UPDATE" /> </intent-filter>

<meta-data android:name="android.appwidget.provider" android:resource="@xml/my_app_widget_info"

</receiver>

By updating the widget's onReceive method handler as shown in Listing 10-14, you can listen for this new Intent and use it to update your widget.

Mobile Apps Made Easy

Mobile Apps Made Easy

Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.

Get My Free Training Guide


Post a comment