I am developping an Android application using tse ArcGIS SDK for Android. I am facing a problem when querying a featurelayer: the featurelayer I am using is hosted in our ArcGIS Online, and this is code I am using for the query:
public final String mNonValidatedURL="http://LINK-TO-SERVICE/FeatureServer/0";
QueryParameters qParam = new QueryParameters();
qParam.setReturnGeometry(true);
qParam.setOutSpatialReference(wm);
qParam.setWhere("Validation='Non-validé'");
qParam.setReturnGeometry(true);
qParam.setOutFields(new String[]{"*"});
Map<String, Order> obf = new HashMap<String, Order>();
obf.put("Date", Order.ASC);
qParam.setOrderByFields(obf);
QueryTask qTask = new QueryTask(mNonValidatedURL);
try
{
FeatureResult results = qTask.execute(qParam);
return results;
}
catch (Exception e)
{
Log.e("freaking exception", e.toString());
e.printStackTrace();
return null;
}
sometimes the query is executed without problems but most of the time I am catching this error: