So, after a rather long absence from Android, I decided to dive back in and start tweaking an app I started a while back. This particular app uses the GPS to store a location in a database. The problem was, the app would sometimes try and store the location before the GPS was even ready, resulting in coordinates of 0, 0. At the same time, I also wanted the GPS reading to be as accurate as possible before it was stored in the database. Accuracy of +/- 80 feet is not so useful in the long run.
After some thought on how best to accomplish this without pissing off the user (nobody likes an application that seems to hang, even if there is something ticking in the background), I settled on displaying a ProgressDialog to let the user that something is indeed happening, and they can continue once its done.
continue reading…