I want to call a web service from my android app IntentService (onHandleIntent method) but as they said its not safe following this url start async task from onhandleintent what is the best method to call a web service from onHandleIntent and getting data returned by the web service to use it?
@Override
protected void onHandleIntent(Intent intent) {
try{
getTransactions get=new getTransactions("0");
get.execute(d1,d2);
//Here in on postExecute i need to do something with the results
}
}
catch(Exception e)
{
writeToFile("Exception" + e + "\n");
}
MyReceiver.completeWakefulIntent(intent);
}