I have an application that needs to download JSON from URL using AsyncTask and on onPostExecute() pass that JSON Object to next Activity using putExtra method, but I'm constantly getting an error,which reads "putExtra can only be used to pass strings and not Objects"?How to fix this?
Do this when passing the param:
intent.putExtra("json", jsonobj.toString());
And in your new activity parse it like so:
JSONObject obj = new JSONObject(getIntent().getStringExtra("json"));
1.4m articles
1.4m replys
5 comments
57.0k users