Getting More Location Data

To actually plot your image on this map, you need to know where it is. Add an additional extra parameter to your Flickr API query to fetch a lat-lon pair back for your GalleryItem.

Listing 32.7  Adding lat-lon to query (FlickrFetchr.java)

p​r​i​v​a​t​e​ ​s​t​a​t​i​c​ ​f​i​n​a​l​ ​S​t​r​i​n​g​ ​A​P​I​_​K​E​Y​ ​=​ ​"​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​X​"​;​ p​r​i​v​a​t​e​ ​s​t​a​t​i​c​ ​f​i​n​a​l​ ​S​t​r​i​n​g​ ​F​E​T​C​H​_​R​E​C​E​N​T​S​_​M​E​T​H​O​D​ ​=​ ​"​f​l​i​c​k​r​.​p​h​o​t​o​s​.​g​e​t​R​e​c​e​n​t​"​;​ p​r​i​v​a​t​e​ ​s​t​a​t​i​c​ ​f​i​n​a​l​ ​S​t​r​i​n​g​ ​S​E​A​R​C​H​_​M​E​T​H​O​D​ ​=​ ​"​f​l​i​c​k​r​.​p​h​o​t​o​s​.​s​e​a​r​c​h​"​;​ p​r​i​v​a​t​e​ ​s​t​a​t​i​c​ ​f​i​n​a​l​ ...

Get Android Programming: The Big Nerd Ranch Guide, 2nd Edition 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.