Android Open Source - cnp J S O N Request Task






From Project

Back to project page cnp.

License

The source code is released under:

MIT License

If you think the Android project cnp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.urucas.services;
/*from  w w w  .  java  2  s .c  om*/
/**
* @copyright Urucas
* @license   Copyright (C) 2013. All rights reserved
* @version   Release: 1.0.0
* @link       http://urucas.com
* @developers Bruno Alassia, Pamela Prosperi
*/

import org.json.JSONException;
import org.json.JSONObject;

import android.util.Log;

public class JSONRequestTask extends RequestTask{

  public JSONRequestTask(JSONRequestTaskHandler _jrsh) {
    super(_jrsh);    
  }

  @Override
  protected void onPostExecute(String result) {
    try {
      Log.i("json result", result);
      JSONObject response = new JSONObject(result);
      jrsh.onSuccess(response);
      
    } catch (JSONException e) {      
      jrsh.onError(e.getMessage());
    }
  }

}




Java Source Code List

com.urucas.copynpaste.CNPApplication.java
com.urucas.copynpaste.activities.HomeActivity.java
com.urucas.copynpaste.activities.SplashActivity.java
com.urucas.copynpaste.adapters.PostsAdapter.java
com.urucas.copynpaste.callbacks.PostsCallback.java
com.urucas.copynpaste.callbacks.UserCallback.java
com.urucas.copynpaste.controllers.ApiController.java
com.urucas.copynpaste.model.Post.java
com.urucas.copynpaste.model.User.java
com.urucas.copynpaste.parser.PostParser.java
com.urucas.copynpaste.parser.PostsParser.java
com.urucas.copynpaste.parser.UserParser.java
com.urucas.services.JSONRequestTaskHandler.java
com.urucas.services.JSONRequestTask.java
com.urucas.services.JSONRequest.java
com.urucas.services.RequestTaskHandler.java
com.urucas.services.RequestTask.java
com.urucas.utils.Utils.java