Back to project page Dumbledroid.
The source code is released under:
Copyright (c) 2013, Leocadio Tin? All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...
If you think the Android project Dumbledroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package io.leocad.dumbledoreexample.models; //w w w. j a v a 2 s .c om import io.leocad.dumbledroid.data.AbstractModel; import io.leocad.dumbledroid.data.DataType; import java.util.List; import java.util.Vector; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import android.content.Context; public class FlickrPhotos extends AbstractModel { private static final long serialVersionUID = 1L; public String title; public List<PhotoItem> items; public FlickrPhotos() { super("https://secure.flickr.com/services/feeds/photos_public.gne"); } public void load(Context ctx, String query) throws Exception { List<NameValuePair> params = new Vector<NameValuePair>(); params.add( new BasicNameValuePair("format", "json") ); params.add( new BasicNameValuePair("nojsoncallback", "1") ); params.add( new BasicNameValuePair("tags", query) ); super.load(ctx, params); } @Override protected DataType getDataType() { return DataType.JSON; } }