AnsweredAssumed Answered

while loop with query

Question asked by hamri.said on Oct 15, 2014
Latest reply on Oct 20, 2014 by ebader-esristaff

Hello everyone, I am trying to use a while loop on my Android application but the application freezes. What I'm trying to do is track the user location (using onlocationChanged) and keep querying a FeatureLayer until the query returns a result. I am using a boolean "noResults" that is changed to false on the query callback(in order to stop the while loop)  here's what I did: "while(noResults) { //query code here }. " Is there anything I should change in the loop? are there any other alternatives to the while loop that keeps the application from freezing?

Outcomes