Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

22. Extending Android Application Reach > Acting as a Content Type Handler

Acting as a Content Type Handler

Your application can act as a content type filter—that is, handle common intent actions such as VIEW, EDIT, or SEND for specific MIME types.


Image Tip

See the android.content.Intent class for a list of standard activity actions.


A photo application might act as a content type handler for VIEW actions for any graphic formats, such as JPG, PNG, or RAW image file MIME types. Similarly, a social networking application might want to handle intent SEND actions when the underlying data has a MIME type associated with typical social content (for example, text, graphic, or video). This means that any time the user tries to send data (with the MIME types that the social networking application was interested in) from an Android application using an intent with action SEND, the social networking application is listed as a choice for completing the SEND action request. If the user chooses to send the content using the social networking application, that application has to launch an Activity to handle the request (for example, an activity that uploads the content to the social networking website to share).


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial