Your next task with PhotoGallery is to search photos on Flickr. In this chapter, you will learn how to integrate search into your app the Android way.

Or the Android ways, as it turns out. Search has been integrated into Android from the very beginning, but (much like the menu button), it has changed a lot since then. Like menus, the new code for search was built on the existing APIs. So when you build search in the older style, you are preparing to implement the full-featured modern Jelly Bean search.

Searching Flickr

Let’s begin with the Flickr side of things. To search Flickr, you call the flickr.photos.search method. Here is what a flickr.photos.search method invocation to look for the text red looks like:

 ​ ​ ​ ​h​t​t​p​:​/​/​a​p​i​.​f​l​i​c​k​r​.​c​o​m​/​s​e​r​v​i​c​e​s​/​r​e​s​t​/​?​m​e​t​h​o​d​=​f​l​i​c​k​r​.​p​h​o​t​o​s​.​s​e​a​r​c​h​ ...

Get Android Programming: The Big Nerd Ranch Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.