Friday, October 8, 2010

A new version of Android Hudson Mood Widget


After long re-factoring, improvements and weeks of field testing a new version of the Android Hudson Mood Widget is released! The application went through almost complete overhaul! Besides a number of bug-fixes a lot o new functionality is added, such as gzip support, ability to trigger builds from the phone, etc. The version numbering jumped from 0.10 to 1.0b (yes it'll always be in beta :-). The big jump can be explained by the fact that the app went through major changes. The release notes can be found at the end of this article. Here is an overview of how the application looks like now and what it can do:

Widget and notifications

The main purpose of the application remains the same - monitor hudson instances in the background, show monitored status in a simple way by using the traffic lights colors: red, yellow, green (and unknown) as shown below:


When build status of a job on the monitored hudson view or page changes the application shows notifications with information about the status change. Upon touching the notification a built-in browser opens that will show monitored jobs and their statuses.

Main screen

In the previous version the main screen of the application was the configuration screen which is now replaced by a built-in browser (the same screen now opens when a notification icon is touched or clicked).

The title of the browser displays the name that the monitored hudson view that was given on the Settings screen. The main area displays list of hudson jobs with their status at the moment of syncing, with the support of animations in hudson-style indicating builds in progress. The main screen also contains menu options that consists of three items:

The first one (Browser) allows to see the same page but in the phone browser essentially opening that very same page in it!
The second on - refresh - allows refreshing the page which fetches the latest info on the monitored hudson view.
And, the third one - Settings menu item which basically leads us to the Settings screen where you can change the configuration of the monitored hudson instance or any of the general settings.

Job Details screen


Upon clicking/touching a job on the main screen a job details view opens. This one displays the latest status of the job which includes the job build number, it's stability level, health and description.
The options menu here also allows refreshing the job details, opening the job details in phone regular browser and, finally, you can trigger the build of that job! Of course, if the job is not build-able (which can be the case if it's disabled) - the option is grayed out.










Settings screen

The settings screen is also the one that opens when the widget is added to the home screen for the first time. It contains two tabs: one build specific and generic which are shared among all instances of Hudson Mood widget. The main options on the build specific tab are:

  • The widget name (also displayed on the home screen under the widget).
  • The hudson view URL among with a button opening another built in browser (see the next section below). Both http as well as https protocols are supported.
  • Login information, in case access to the monitored builds requires authentication.
  • 'Test build status' button that allows for quick check (before you can close the window) on whether the hudson instance can be reached and whether the build can be detected.
The second, 'General', tab contains options, shared among all instances of the widget and contain options such as ability to enable or disable sound or vibration notifications (or disable notifications altogether). One of the options also allows you to ignore such situations when the hudson status can not be read or interpreted, this can happen, for example, when you have poor connectivity with your mobile provider or if your hudson instance is only accessible via wifi and you left the coverage zone (or switched wifi it off)...
Last but not least, the update frequency for widgets. Frequencies, marked with the * are the ones that are least demanding on the battery consumption. This has to do with the way Android schedules background tasks.




Build detection browser

One and not unimportant screen is the build detection browser which is yet another built-in browser of the application, this screen can be accessed by pressing the button located to the left of the URL text field on the 'Build' tab.
Why would you need it? In case if the URL of the monitored hudson instance is too long or difficult to type, you can open up that internal browser and type-in any URL there. The browser similar to the regular Android browser and is capable of detecting whether opened page contains hudson views or jobs that can be monitored by the widget! For instance if you don't want to monitor the main page of the hudson instance but separate views or even individual jobs imagine how long and complex the URLs can be?! Well, in this case you only have to type the url of the main hudson page which is usually pretty short and then navigate to the desireable view that you want monitored! After you've naviated to the right page just click the 'save' button and the url will be automatically picked up by the Settings screen in the URL preference.



That was an overview of new features, here is the total list of changes that the last version of the application went through (the full changelog can be found on Hudson official wiki):


Version 1.0b changelog:

Bugfixes:
  • Fixed a session cookie bug preventing from detecting build statuses with the Build Detection browser on Hudson versions 1.379 and higher
  • Fixed a bug preventing from detecting job status with the 'test URL' button for individual jobs
Features:
  • New main screen with jobs overview
  • Job details view
  • 'View in browser' feature for both main screen and job details view
  • Animation support for builds in progress
  • Ability to trigger job builds
  • Support for GZIP encoding - reduces battery consumption!
  • Based in user feedback the Test URL button is renamed to 'Test build status' to be less confusing

1 comment:

Prabhat Jha said...

Is source code of this app publicly available? Thanks.