5.7“The Book of Old Edinburgh”
One interesting feature that was added into the application was the ability to read one or more of the old historical books about Edinburgh. “The book of Old Edinburgh” was a book published in 1896 with historical accounts of the buildings mentioned in the application. This out of copyright book was available in a variety of formats from the Internet archive site “www.archive.org” [66].
After some thought, it was decided to display the book in PDF format rather than plain text. The advantages of using this format were that the images in the book could still be seen and that the PDF reader from Abode was free and widely used. One disadvantage was that it could be quite slow to display large PDF files on lower powered devices. The “Book of Old Edinburgh” was about 11Mbytes in size, containing about 160 pages. The quality of the PDF content was excellent but probably too good for a mobile device; when this file was used it took around 10 seconds for the initial pages to load and scrolling through the book was not smooth.
To reduce the size of the file, and just as important to increase the speed that the file was displayed, the resolution of the file was reduced. This was achieved by running a Postscript/PDF interpreter program called “Ghostscript” [67] on an Ubuntu machine. After trying many combinations of parameters the following settings were used to achieve the desired result:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dColorImageResolution=70 -dColorImageDownsampleType=/Average -dGrayImageDownsampleType=/Average -dGrayImageResolution=110 -dMonoImageResolution=110 -dMonoImageDownsampleType=/Average -dOptimize=true -dDownsampleColorImages=true -dDownsampleGrayImages=true -dDownsampleMonoImages=true -dNOPAUSE -dBATCH -sOutputFile=output.pdf oldedinburgh.pdf
This reduced the file size by a third but also made the loading a lot faster.
In the application, the file was displayed by creating an implicit intent (with the application type set to “application/pdf”). When being run, Android would use intent resolution to select the application to use (possibly asking the user to choose a particular program if many applications could support it). If a PDF reader was not available on the device then a message would be displayed to the user.
6.1Testing the software
For development and testing a Samsung i5500 Galaxy Europa mobile smartphone (Android Version 2.1 Update 1) was used. Testing was done during development and to help this logging code was added into the application so that any unexpected errors or code paths being taken were displayed to the DDMS window of the Eclipse development tool.
Several field trials were done in Edinburgh to make sure the application (and in particular the map location code) was working correctly and reliably. This revealed several interesting issues. At one point in the trials, the application kept crashing unexpectedly (which it did not do during development). This was eventually found to be due to the location code not being disabled when the map activity was being sent into the background (i.e. when the activity was being restarted due to the device being rotated). When the issue was resolved, it was seen that the user’s location on the map was accurate.
Sometimes the device had difficulty in locking on to a GPS signal in the centre of Edinburgh (possibly this was due to the proximity of the buildings in the city since other GPS aware applications on the same device were struggling too). Another feature tested was the geolocking code. This aspect of the application worked well, displaying the distance to Edinburgh castle accurately.
As a result of early field trials, several new features were added to improve the usability of the application; a compass to help align the maps and a “disable screen timeout” option to stop the automatic dimming of the screen (as this was becoming an annoyance when the map was being used). In addition to this a note was added into the user manual explaining how to lock the orientation of the screen (since it was noticed that when walking with the device, the screen orientation kept changing with the motion of the user’s hand which could be distracting).
The application was tested with no SD card inserted to make sure it could gracefully handle that situation and display an error message).
To test the multi-language support a program called “MoreLocale2” was installed [71]. This allowed many more locales to be installed on the Android device than those that were already present. An example of this was the Chinese locale that was not on the device originally but needed to be added to show the application could properly display Chinese language characters.
6.2Emulator Testing
The application was run on several Android emulators so it could be tested on different versions of the operating system with different resolutions and devices types (including a tablet format). This included the Samsung Galaxy Tab emulator and the Android V3 Honeycomb emulator.
At one point during testing (when the application was being run on the Honeycomb emulator) an interesting bug arose that took a long time to resolve. It was seen that only a few of the pages displayed the text in their articles. It turned out that the “titleText” text view component in the “hguidepage_t1” layout file was set to “fill_parent” for its height when it should have been set to “wrap_content”. This caused the main text to be completely hidden in the scroll view. Interestingly, when the application was run on Android V2.1 (update 1), it displayed correctly. It took a long time to debug this since the Honeycomb emulator was extremely slow.
-
The engraving page shown on the Samsung Galaxy Tab emulator
-
A content page shown on the Samsung Galaxy Tab emulator
Share with your friends: |