8. Sharing Data with Intents
One of the strengths of Android is the ability to share data between multiple components of an app as well as with components of an external app. In previous chapters, the content provider was discussed as a mechanism to perform internal and external data sharing. While a content provider can be a useful mechanism to share data in Android, it is not the only method.
This chapter discusses an alternative method for sharing data in Android by using the Android intent API.
Sending Intents
Intents provide a convenient way to send data from one Android component to another. They are frequently used to pass data from one activity to another when starting a new activity or service.
Explicit Intents
Listing 8.1 shows a ...
Get Android™ Database Best Practices now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.