public void build(String code,JSONArray dataList){
  try {
    result.put(resources.getString(R.string.intent_extra_status),resources.getString(R.string.shared_pref_default_status));
    result.put(resources.getString(R.string.intent_extra_code),code);
    if (dataList != null) {
      result.put(resources.getString(R.string.intent_extra_data),dataList);
    }
    operationListResult.put(result);
  }
 catch (  JSONException e) {
    Log.e(TAG,"Invalid JSON format." + e.toString());
  }
}

public void build ( String code , JSONArray dataList ) { try { result . put ( resources . getString ( R . string . intent_extra_status ) , resources . getString ( R . string . shared_pref_default_status ) ) ; result . put ( resources . getString ( R . string . intent_extra_code ) , code ) ; if ( dataList != null ) { result . put ( resources . getString ( R . string . intent_extra_data ) , dataList ) ; } operationListResult . put ( result ) ; } catch ( JSONException e ) { Log . e ( TAG , "Invalid JSON format." + e . toString ( ) ) ; } }
add operation results to the array to be returned .
