Refresh Jobs

The RefreshJobs Activity performs a simple yet vital role in the Field Service Application. Whenever requested, the RefreshJobs Activity attempts to download a list of new jobs from the server. The UI is super simple—just a blank screen with a ProgressDialog informing the user of the application's progress, as shown in figure 12.8.

The code listing for RefreshJobs is shown in listing 12.13. The code is rather straightforward, as most of the heavy lifting is done in the JobListHandler. This code's responsibility is to fetch configuration settings, initiate a request to the server, and put a mechanism in place for showing progress to the user.

0 0

Post a comment