Change
private class Downloadfiles extends AsyncTask<URL, Integer, JSONObject>{
to
private class Downloadfiles extends AsyncTask<String, Integer, JSONObject>{
And change
@Override
protected JSONObject doInBackground(URL... params) {
Log.e("msg++--", "play game method called");
to
@Override
protected JSONObject doInBackground(String... urls) {
String url= urls[0];// get the URL String here
And Finally call the AsyncTask
like
new Downloadfiles (this).execute(URL1);// For Button1
and
new Downloadfiles (this).execute(URL2);//For Button2 and so on