How to send JSon to another activity?
public class SolicitaDados extends AsyncTask<String, Void, String> {
@Override
protected String doInBackground(String... urls){
return Conexao.postDados(urls[0], parametros);
}
@Override
protected void onPostExecute(String resultado){
try {
JSONObject Dados_Geral = new JSONObject(resultado);
JSONArray arrayEmpr = Dados_Geral.getJSONArray("empresa");
JSONArray arrayEsta = Dados_Geral.getJSONArray("estado");
} catch (JSONException e) {
e.printStackTrace();
}
}
}
I have in MainActivity 2 JSONArray- > company and state, I now need to use company in the activity company, and state in the activity state. How can I send you these arrays?
Thanks for the help! I am a beginner and I am not understanding very well all the Java programming content Android.