Android Intents: Developer Best Practices, Page 2
Develop Your Own Android Intents
Android app developers can, in theory, promote their applications more easily at the OS level by implementing and exposing their own intents for other Android apps to use. The user will still need to install your Android app first, but they're more likely to use it if it's well-integrated into their OS. Clever, eh?
The simplest way to do this is to provide functionality associated with that first group of intent types, again like ACTION_VIEW
, ACTION_EDIT
, and ACTION_SEND
, with the content types in which your specific application excels. These are the types of intent requests most frequently used on the system, for features like "Share." By using these stock intent types, your application will automatically become one of the applications that is listed in any picker when more than one application is capable of handling an intent request. The originating application doesn't even need to know of your existence to integrate with you.
Regardless of which avenue you take, it's your responsibility to provide adequate documentation of the intents your application uses and the extra data it supports.
Conclusion
Android intents are the foundation of the powerful application integration system that helps set Android apart from competing platforms. Your applications can integrate with other applications by using those intents that are properly exposed and documented, and expose your own application functionality to other applications by handling intents of specific actions and types within your own applications.
About the Authors
![]() |
Shane Conder and Lauren Darcey -- Contributing Editors, Mobile Development -- have coauthored two books on Android development: an in-depth programming book entitled Android Wireless Application Development (ISBN-13: 978-0-321-62709-4) and Sams Teach Yourself Android Application Development in 24 Hours (ISBN-13: 978-0-321-67335-0). When not writing, they spend their time developing mobile software at their company and providing consulting services. | ![]() |
Originally published on https://www.developer.com.
Page 2 of 2