I have this exception and I was reading a thread on this, and it seemed confusing:
How to fix android.os.NetworkOnMainThreadException?
I already added this l
You can just create Async class as below
class Retrievedata extends AsyncTask { @Override protected String doInBackground(String... params) { try{ //Your code } return null; } }
You can just put your all code inside doInBackground method