I am trying to ServiceFeatureTables with QueryParameters, that contains a whereClause, but the Query execution fails every time with this error.
com.esri.arcgisruntime.io.JsonEmbeddedException: Failed to execute query.
I Have tried executing the query in arcs web client and iOS, it seems to be working fine but whenever I try to execute the same in android it fails and throws the exception.
Can anyone tell me what am I doing wrong?
Code snippet:
table.loadAsync()
val queryParameters = QueryParameters()
queryParameters.whereClause = whereClause
table.addDoneLoadingListener {
if (table.loadStatus == LOADED){
val queryResult: ListenableFuture<FeatureQueryResult> =
table.queryFeaturesAsync(queryParameters, LOAD_ALL)
queryResult.addDoneListener{
try{
val result = queryResult.get()
val resultIterator = result.iterator()
if (resultIterator.hasNext()) {
resultIterator.next().run {
featuresList.add(this)
}
}
}catch (e: Exception){
e.printStackTrace()
}
}
}
}