July 2010

« August 2010 | Main | April 2010 »

OnTrack 2.5.6 Released

Thursday, July 29, 2010

I have uploaded OnTrack 2.5.6 to the market, this is primarily a bug fix release with the following issues corrected:

  • The dashboard has been adjusted to fit properly on small screens like the HTC Tattoo
  • Fixed a problem where the backup file could be truncated in rare cases.
  • Added an option to e-mail the backup file.
  • Fixed problem with re-ordering categories and subtypes on larger screens where list entries would shrink when drag was completed.
  • Increased the font size under the buttons on the dashboard on medium and large screens
  • Fixed problem where dashboard wallpaper looked squeezed when viewed in landscape
  • If you changed the date/time when adding an entry and then changed the phone orientation the date and time changed to now. This has been fixed.
  • The calculation used for the auto-selection of a category based on time was off resulting in the wrong category being picked in some circumstances, this has been fixed.

Posted by Gerald Nunn at 8:42 AM | Categories: Android | Permalink |


OnTrack and HTC Sense UI Startup Problems

Sunday, July 11, 2010

As most of you know the lastest version of OnTrack introduced a new start screen for OnTrack, unfortunately it appears that there is a bug in the HTC customized home screen Sense UI that is causing OnTrack not to start correctly. The issue is I changed the class name of the launch activity and once you update the application the HTC home screen has issues because it tries to use the class name it previously cached.

Unfortunately this is not something I can fix as it is a problem in HTC's code, stock Android phones have no issue with the change. Changing the launch activity back to the old one will just cause the same issue for everyone that has already worked around this problem or new users who installed it for the first time.

Fortunately there are a few ways you can try to correct the issue and I have had reports that at least one of these will work:

  • Upgrade to 2.5.4. I have attempted to fix the issue by creating a new activity with the old class name that forwards to the right OnTrack home screen. Try upgrading to this version to see if it corrects the issue.
  • Replace icon on home screen. The easiest thing to try first is to replace the icon on the home screen. To do this, hold you finger down on the OnTrack icon on the home screen and drag it to the trash. Then open the sliding drawer and replace the icon on the home screen again If this doesn't work move on to the next item.
  • Reboot phone. In this workaround first remove the OnTrack icon from the home screen, turn your phone off and on (reboot) to clear the HTC internal cache and then add the icon back to the home screen.

  • Re-install OnTrack. In this step we uninstall and re-install OnTrack from the Android market. To do this in a way you don't lose data please follow the steps below.

Here are the steps for re-installing OnTrack without losing any data:

  1. Open the OnTrack application from the Market application and select the Tools icon on the new home screen. Select the Backup tool and press the Backup button. You should see a progress bar go from left to right backing up your data.
  2. Validate your data is present by connecting the phone to a computer and checking that the file backup.xml is in the OnTrack folder on your SD Card. Copy the file backup.xml to your computer to make an additional backup.
  3. Disconnect your phone from the computer, very important otherwise restore step will not work.
  4. Uninstall the OnTrack application from your phone.
  5. Re-install the OnTrack application to your phone from the Market.
  6. Go into the Tools menu again and select the Restore option, this will restore your data from the backup.xml file.

If none of these work please send me an e-mail at Gerald Nunn and I will try to assist you further.

Posted by Gerald Nunn at 8:26 AM | Categories: Android | Permalink |


OnTrack Updated to 2.5.3 in Market

Friday, July 09, 2010

Just a quick note to say I updated OnTrack to 2.5.3 in the Android market. Apparently the Android home screen caches the application activity to start when the application is launched. This means the new screen was bypassed along with some important initialization causing an error. I've moved the initialization to an Application object, which I should have done in the first place, and hopefully that will correct the problem. Another way to workaround it is to simply remove the OnTrack icon from your home screen and then add it back.

Finally there was a small issue where the backup progress bar wasn't working correctly, that has been fixed as well.

Posted by Gerald Nunn at 8:38 AM | Categories: Android | Permalink |


Linux alternative to NetMeeting

Thursday, July 08, 2010

I switched to Linux full time from Windows about eight months ago and haven't looked back, for the work I do and the software I use Linux has worked great. My Java based development tools are more responsive under Linux and generally everything feels snappier. I have found approriate alternatives to most of the software I used in Windows with a few notable exceptions. One exception for example is MS Office and Visio however an easy way to workaround that is to use Windows in VirtualBox to run MS Office and Visio. VitualBox starts so fast from a saved state that it doesn't bother me at all.

One piece of software I have been struggling to find an equivalent to is NetMeeting though. As a technical consultant I pretty much spend all my time at client sites working with their staff and 99.99% of the time the staff are running Windows. Fair enough, I have no issue with Windows however invariably the client will need to do some add-hoc desktop sharing over the network and usually the tool of choice for them is Netmeeting. When the client is hosting the meeting, for example when they want me to watch them perform an install of something, I usually just run Netmeeting in the VirtualBox Windows VM and it works great. The more problematic scenario is when they need me to host a meeting and share my desktop with multiple people.

It's not that Linux isn't capable of doing this, VNC can fill this need in a pinch but the issue I initially had is very few people in the Windows world have VNC clients installed on their machine or worse even know what VNC is. I needed a way to share my desktop with multiple people on the same LAN in way that works regardless of the platform the other folks have. One solution is to use a web conferencing product like Yugma or Webex which support sharing a Linux desktop. These are not slam dunks though, the problem with Webex is that it costs money and the company I work for won't cover it. Yugma on the other hand has a free account however it didn't work for me through the client's proxy. Finally the last issue is sometimes I deal with sensitive information and I'd prefer not to route the connection over the Internet, Netmeeting keeps everything on the client's corporate network.

I spent quite a bit of time thinking about this and cobbled together a solution based on a few open source projects that in my initial testing seems like it will fill the bill very well. The first part of the solution is the tried and true VNC, specifically the x11vnc project which allows you to share your current desktop easily to multiple people over a LAN. However as mentioned previously, my concern was that most people in the Windows world don't have a VNC client but after some additional research it turns out that there are a couple of ways to skin that cat and make things work.

First, after reading up on x11vnc and vncserver, I found that both products also start a simple http server in addition to the VNC server. This http server is used to serve a Java based VNC viewer, in the form of an applet, to a browser. This allows any browser with a Java plugin to access your desktop without having a VNC viewer installed previously. This is quite helpful however in testing some machines at my client I found that many of them didn't have Java enabled, therefore I needed something more ubiquitous.

For rich applications in the world of the web it doesn't get more universal then Flash and sure enough some kind hearted individual has a Flash based VNC viewer called Flashlight-VNC. If we combine Flashlight-VNC with x11vnc we get the winning combination, a netmeeting like experience served from the browser that should work for almost any client. All you need to do is send a URL to your machine to the people who wish to connect and they simply open it in a browser to view your desktop.

Here are the steps needed to get this working.

Download and install x11vnc

The first step is to download and install x11vnc on your machine. All Linux distributions should have this available in their repository so try downloading it from there first. We are using x11vnc over vncserver because vncserver does not allow you to easily share your current desktop, rather it exposes a different display to remote users.

Download Flashlight-VNC

Next download the Flashlight-VNC package from their website and extract all the files to a folder. At the time of this running 2.0.3 of Flashlight-VNC was available, I would recommend downloading the latest swf from here http://flashlight-vnc.sourceforge.net/swf/Flashlight.swf to avoid the issue described here.

Create Scripts

The next step is to create some scripts to start and stop the x11vnc server and the Flashlight-VNC policy server. I created my scripts in /home/gnunn/bin/x11vnc where /home/gnunn is my home directory, make sure to update the HOME_DIR variable in the script below to reflect your script's location. Here is the start.sh script:

#!/bin/bash

HOME_DIR="/home/gnunn/bin/x11vnc"

rm -rf ${HOME_DIR}/logs/*.out

IP="$(/sbin/ifconfig eth0 | sed -n '/inet /{s/.*addr://;s/ .*//;p}')"
HOST=$(hostname)

nohup x11vnc -forever -shared -viewonly -httpdir ${HOME_DIR}/classes -gui tray -desktop "Linux Main Desktop" -solid "#FFFFFF" -display :0 >${HOME_DIR}/logs/x11vnc.out &
nohup java -jar policyserver.jar >${HOME_DIR}/logs/policyserver.out &

echo "VNC is running on port 5900"
echo "PolicyServer is running on port 1234"
echo "Users can access client at http://${HOST}:5800 or http://${IP}:5800"
echo "Make sure your local firewall is stopped or has these ports open"

The key parameters that we pass to x11vnc are:

  • viewonly. This parameter prevents users from interacting with your desktop.
  • shared. This allows multiple clients to connect to the same desktop simultaneously.
  • forever. Keeps x11vnc running forwever instead of shutting down when the first client disconnects.

Here is the corresponding stop script:

#!/bin/bash

x11vnc -remote stop

Add Web Server Files

In this step we create the files that are going to be served by the x11vnc http server, these are the files that the user's browser will download when they connect to your machine. There are two files, index.vnc which is the default html page served by x11vnc and Flashlight.swf which is the Flash code for the VNC viewer. In the directory where you saved the scripts create two sub-directories, one called classes and one called logs.

In the classes directory, create a file called index.vnc with the following contents:

<html>
	<title>
	$USER's $DESKTOP desktop ($DISPLAY)
	</title>
	<body>
<script type="text/javascript">
document.writeln("<object id='Flashlight' width='100%' height='100%' type='application/x-shockwave-flash' data='Flashlight.swf'>");
document.writeln("<param name='movie' value='Flashlight.swf'/>");
document.writeln("<param name='allowScriptAccess' value='always'/>");
document.writeln("<param name='wmode' value='opaque'/>");
document.writeln("<param name='FlashVars' value='host=" + window.location.hostname + "&port=$PORT&viewOnly=true&shared=true&autoConnect=true'>");
document.writeln("</object>");
</script>			
	</body>
</html>

Next copy the Flashlight.swf file from the Flashlight-VNC download into the classes directory.

Copy policyserver.jar

In this step we need to copy the policyserver.jar file from the Flashlight download to the directory where we created the start.sh and stop.sh scripts. This policy server is required by Flash in order that it can retrieve a security policy that allows Flashlight-VNC to make a VNC connection to your machine.

Start the Server

We are now ready to start the server, open a terminal windows and run start.sh. If everything worked correctly you should see the x11vnc tray icon appear in your system tray and a small floating window sating that the Policy server is now running on port 1234.

To test the connection, open a browser on a different machine and connect to the URL given by the script. If the host name doesn't work try the IP instead. If it is still not working make sure firewalls are turned off on both machines

Conclusion

There is a lot of room for improvement in this setup but hopefully that is enough to get you started and thinking about the possibilities. Some areas for improvement, should you be so inclined include:

  • Give the user a choice of Flash or Java connection options by modifying index.vnc
  • Eliminate the policy server by having the x11vnc http server return the policy
  • Alternatively, improve the policy server so it doesn't display a window on the desktop and supports being stopped remotely like x11vnc.

Posted by Gerald Nunn at 10:26 PM | Categories: Linux | Permalink |


OnTrack 2.5.1 release in the market

OnTrack 2.5.1 has been released to the market, the new features are listed in my previous post. Unfortunately the new log book didn't quite make it into this release, I hope to have it ready and available later next week.

Posted by Gerald Nunn at 8:04 PM | Categories: Android | Permalink |


OnTrack 2.5.0 coming soon

Sunday, July 04, 2010

Work on OnTrack 2.5.0 is progressing and it should be released in the next week or two. In this release the major emphasis was on improving useability, particularly for new users, The following changes were made in this version:

  • A dashboard screen as the new OnTrack home screen has been added, however an option to use the old home screen as the default is available.
  • In line with the new dashboard screen, the navigation to features which were buried in menus or settings has been improved.
  • Added a new scatter graph that shows Glucose by Time of Day, allows user to better discern when low and high scores typically occur.
  • The backup feature now backs up OnTrack settings in addition to data.
  • Added disclosure indicator to menu like screens to better indicate to click to move to next option.
  • Added 'Delete' option to pop-up menu when viewing an individual entry, category or subtype.
  • Force blood pressure to use 'Phone' keyboard type.
  • Made 'Phone' the default keyboard for new users.
  • Fixed problems with entering HbA1C.
  • Added support for Body Fat type.
  • Allow two decimals in medication entry.

I'm also hoping to have a new logbook feature in this version as well, this will create an HTML document that mimics the format of a logbook.

Finally I have received a few requests from people with regards to how to donate to the development of OnTrack, as a result I added donations link to the OnTrack pages.

Posted by Gerald Nunn at 9:00 PM | Categories: Android | Permalink |