Passing on Responsibility

Use the startNextMatchingActivity method to pass responsibility for action handling to the next best matching application component, as shown in Listing 5-9.

LISTING 5-9: Passing on Intent Receiver Handling Available for download on Intent intent = getIntent(); Wrox.com if (isDuringBreak)

startNextMatchingActivity(intent);

This lets you add additional conditions to your components that restrict their use beyond the ability of the Intent Filter- based Intent resolution process.

Prepared for ASHLEE KABAT, email: [email protected] Order number: 56760408 This PDF is for the purchaser's personal use in accordance with the Wrox Terms of Service and under US copyright as stated on this book's copyright page. If you did not purchase this copy, please visit www.wrox.com to purchase your own copy.

Available for download on Wrox.com

In some cases your component may wish to perform some processing, or offer the user a choice, before passing the Intent on to an alternative component.

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