Skip to content

Commit

Permalink
fixed bug where Flickr was throwing filenotfounderror, now flickr loads.
Browse files Browse the repository at this point in the history
  • Loading branch information
drunkel committed Dec 1, 2013
1 parent 3385679 commit 847caec
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions src/com/example/mobileseenit/apis/FlickrSearchTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,10 @@ public FlickrSearchTask(Activity g) {

this.g = (MainActivity) g;

// Setup flickrJ object
try {
f = new Flickr(API_KEY, SECRET_KEY, new REST());
} catch (ParserConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

f = this.g.getFlickr();
}


@Override
protected String doInBackground(String... searchTerms) {
Expand All @@ -79,24 +75,23 @@ private String search(String... searchTerms) throws IOException {
SearchParameters searchParams = new SearchParameters();
searchParams.setSort(SearchParameters.INTERESTINGNESS_DESC);

// Create tag keyword array
String[] tags = new String[] { "Dog", "Beagle" };
// searchParams.setTags(tags);
try {
searchParams.setMedia("photos");
} catch (FlickrException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

searchParams.setHasGeo(true);
searchParams.setLatitude(g.getLat().toString());
searchParams.setLongitude(g.getLng().toString());
searchParams.setRadius(g.getRadius().intValue());
searchParams.setRadiusUnits("km");
searchParams.setMinTakenDate(g.getImgsAfter()
.getTime());
searchParams.setMaxTakenDate(g.getImgsBefore()
.getTime());
// searchParams.setMinTakenDate(g.getImgsAfter()
// .getTime());
// searchParams.setMaxTakenDate(g.getImgsBefore()
// .getTime());

// Initialize PhotosInterface object
PhotosInterface photosInterface = f.getPhotosInterface();
Expand Down

0 comments on commit 847caec

Please sign in to comment.