Back to project page PrincePolo.
The source code is released under:
GNU General Public License
If you think the Android project PrincePolo 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 se.agile.asynctasks; // w ww .ja v a 2 s . com import se.agile.githubdata.User; import se.agile.model.JSONParser; import se.agile.model.Preferences; public class RequestUser extends RequestTask<String, Void, User>{ private final String URL = "https://api.github.com/user"; public RequestUser(){ super(); } public RequestUser(RequestListener<User> listener){ super(listener); } @Override protected User doInBackground(String... params) { return JSONParser.parseUser(generalGETRequest(URL)); } @Override protected void onPostExecute(User user){ if(!isCancelled()){ Preferences.setUser(user); finishedWithRequest(user); } } }