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?
Is this work happening on a background thread, using AsyncTask?
It could be that something is bailing out in your loop...maybe.