O'Reilly logo

Android Programming: The Big Nerd Ranch Guide by Brian Hardy, Bill Phillips

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

28Search

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​ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required