Calling the old method call inside AsynTask doInBackground
<p>I'm very new to android programming and I coded my app in Android 2.2. But when I tried to run my app in Android 3 or higher I get an error like :</p>

<pre><code>    android.os.NetworkOnMainThreadException
</code></pre>

<p>In my android 2.2 I have a method like this:</p>

<pre><code>public JSONObject makeServiceCall(String url, Map&lt;String, String&gt; params)
</code></pre>

<p>which is performing the network call operations. Looking into google I found I need to move this code to <code>AsyncTask</code> class of <code>doInBackground</code>. </p>

<p>But I have a trouble in changing the params of <code>doInBackground</code> as it takes <code>Object...</code> varags, where my method takes two parameter <code>String,Map&lt;String,String&gt;</code>.</p>

<p>Are there any work around I can do inside <code>doInBackground</code> to call my original <code>makeServiceCall</code>.</p>

<p>Thanks in advance.</p>
