Tuesday, February 26, 2008

MyExperience Version 0.8.1 Released

You can download version 0.8.1 of MyExperience here. The direct link to the default download package (which does not include source code) is here.

The Release Notes
- There was a bug in NotificationForm with regards to how Snooze was handled. I rewrote NotificationAction and NotificationForm such that the snooze functionality is now handled by NotificationAction outside of the modal dialog. This is probably how it should have been from the beginning. One relevant note is that NotificationAction assumes it is being called by a thread other than the UI thread.
- Fixed a bug in the GLOBALS subsection of the MyExperience.XML file where they appropriate values were not being seen by the application.
- Wrote a hack to force the MainForm to hide. For some reason, a simple this.Hide() or this.Visible=false; call will not work in MainForm. The menubar and titlebar refuse to hide. My hack basically grabs a handle to the desktop window and forces that to the top window.
- Added menu to LoadedSensorsForm to view properties (you could do this before by pressing the select button but that was nonintuitive)
- Added ability to slightly customize the MainForm via Global settings (e.g., you can set the left menu name, you can disable the debug menus from showing, you can disable exiting the program). The end goal, however, is still to make MainForm customization a first level object in the XML file.
- Set this.ControlBox = false on all relevant forms. This takes away the (X) in the upper-right hand corner on PocketPC devices
- Minor change to RandomTimeSensor, added readonly CurrentTimeBlock property
- Fixed LogViewerForm on PocketPCs
- Fixed GlobalsForm property view issue
- Can now access running actions from the AvailableActionsForm
- Fixed NullReferenceException bug in PropertyForm
- Added MspInstantActivitySensor whose state is a tuple where the string is the currently sensed activity and the int is the confidence score (e.g., "Walking, 89" or "Bicycling, 72"). This sensor can update its activity inference four times per second.
- Added MspMessage to create a more object oriented hierarchy around the MSP string messages received over bluetooth from the MSP device.
- Added two hsa_defs.txt files which is used by the MspHumanScaleActivitySensor. This sensor, unlike MspInstantActivitySensor, applies smoothing to activity states (thus it recognizes activities at the "human scale" rather than micro scale).
- Made sure that all connections received from Roam.SqlCe.SqlCeConnectionManager were immediately closed after usage of that connection completed. On the desktop, when using SQL lib, the correct operation is to grab a SQL connection, run a sql command (or a series of sql commands) and then immediately close the connection. On the mobile, because there is no SQL connection pool, the appropriate operation is to keep connections open as long as possible. This is because opening a connection on the mobile can take 1-2 seconds. This is not efficient. Thus, in Roam (http://www.sourceforge.net/projects/roam) I implemented my own SQL connection pool, which is also thread safe. A discussion about connection pooling and SQL thread safety on the mobile can be found on my csharponphone blog at http://csharponphone.blogspot.com/2007/01/keeping-sqlceconnection-open-and-thread.html (which was written more than a year ago now)
- Added some new debug views (e.g., one for viewing SQL information, one for viewing thread information)
- Added DownloadAction that can download an artifact (e.g., music file, image, etc.) based on a provided URL. We are currently using this in UbiGreen to download images.
- Added new overloaded SaveBinaryData method to Action class that takes in a Stream (rather than a byte array)
- Updated amount of DEBUG level logging that the DatabasePopulator class outputs. This should better help us track down issues people are having when MyExperience first starts. I also added more verbse INFO level logging to the Initialize method of MyExperienceFramework, which is automatically shown on the SplashScreen.
- Updated both the AudioRecorder and the CameraWidget so that they are more immune to accidental "double click" or "double keypress" issues.
- The AudioRecorder now has a _minimumRecordTime field (this has not been exposed as a property, however)
- Added RunningSensorCount property to SensorManager
- Updated way Globals closes its SqlConnection (it checks to see if the connection was already open on the current thread before closing it)
- Fixed a bug in SendSmsAction that was causing an exception whenever the empty constructor was used
- Added SaveResult enum that ScreenShotAction, DownloadAction, and others use as their action result
- Added MspWindowActivitySensor which just uses a moving window average for smoothing
- Added refresh menu item to LoadedSensorsForm
- Added CurrentStateDuration and PreviousStateDuration properties to Sensor
- Added new Question script type: OnCreate, which executes when the question is created
- Exposed GetQuestion in SurveyEngine such that a question can call "GetQuestion()" to get a reference to itself

Added Actions Documentation to Wiki

Slowly but surely we are moving documentation over from this PDF to the MyExperience Wiki. I just finished a draft of the Actions section complete with XML examples and screenshots. You should consult the Wiki before looking at the PDF (as the Wiki's documentation will always be more up-to-date).

Monday, February 11, 2008

MyExperience Version 0.8 Released

You can download MyExperience Version 0.8 with source here or without source here.

Release Notes for MyExperience v0.8
- Added AvailableActionsForm which lists the actions defined in the XML file and also allows the researcher the ability to arbitrarily execute any of these actions at any time
- Added RetryInterval property to SendSmsAction
- Updated GPS speed sensor to use different units, e.g., mph, kmph, knots.
- Refactored MyExperience.Sensors.Pols into MyExperience.Sensors.Gsm
- Fixed a bug in SimkinCS where setting properties using reflection were not properly being converted to the right types
- Exposed some ActionManager functionality in XML scripts via the ExecutableBase
- Updated KeyEvent class to have IsNumber and IsLetter Methods
- Updated PlaySoundAction so that volume can be set
- Updated RecordAudioAction so that the save file functionality works more like the ScreenShotAction
- Updated the CreateProcessAction to expose the ProcessStartInfo properties
- Added the KillProcessAction (which is essentially the opposite of the CreateProcessAction)
- Fixed bug in SimkinCS in TypeConverter.cs where a type could not be converted to itself
- Updated NotificationAction to include the ability to turn on the backlight during the notification (this is now on by default)
- Hooked up the TimeOutForm, i had forgotten to integrate this back in to the new SurveyForm after refactor
- Added DesktopVisibleSensor that fires a state change when the desktop becomes visible
- Stripped sensor history functionality out of the base sensor class (this was buggy and will be re-added again in future releases)
- Updated privacy-related functionality for one-way hashing privacy sensitive information that MyExperience logs such as incoming phone call numbers and names
- Added the ability to sense actual sms messages being sent (rather than a boolean value which indicated whether a message was sent or not). This functionality is dependent on a proprietary 3rd party library that Intel Research purchased last year and this library is not checked into the open source library. Thus, by default, this functionality is not enabled and the project: MyExperience.Sensors.InTheHand is not loaded in the .sln
- Renamed SmsSentSensor to SmsSentCountSensor
- Added in privacy preservation in the SystemStatesSensor and SystemStateSensor classes
- Fixed bug in SmsSentSensor when user had never sent any SmsMessages previously (thus, most recent message was null)
- Added ForegroundWindowSensor which is a polling-based sensor that fires a state change when the foreground window's title changes
- Update to AudioRecorder widget, added more thorough instructions to user about how to record their audio.
- Updated DatabasePopulator parse code slightly to log a WARNING when an unexpected start element is found outside an action, sensor, question, or trigger element
- Updated AudioRecorder, CameraWidget, VideoCameraWidget, and TimeOutForm to check for the current platform (e.g., SmartPhone vs. PocketPC) and modify their instructions accordingly (e.g., if on a PocketPC, the CameraWidget says "tap here to launch camera" rather than "press any key to launch camera"
- Optimized SurveyPanel display slightly in SurveyForm. I set the .Size to Form.ClientSize before the SurveyPanel was displayed.
- Fixed bug in MultilineTextBox, where the MinimumHeight was too small
- Updated DateTimePicker slightly to make MinimumHeight a few pixels taller
- Updated RandomTimeSensor with two new properties LastPrompt and TimeUntilNextPrompt that are viewable from the debug viewer making it easier to double check correct behavior
- Added ability to disallow going "back" in a SurveyAction
- Added feature to disable "next" until a user begins entering a response
- Put in simple debouncer on MainForm such that the left menu tap doesn't accidentally invoke multiple instances of a survey
updated exception handling in CustomComparer and ActionManager
- Fixed longstanding bug in DateSensor (see http://csharponphone.blogspot.com/2006/08/issues-with-systemstatedate.html)
- Added new BinaryActionData table to the Database/DatabaseSchema.cs. This table is for actions that collect binary data, which needs saving. For example, the ScreenShotAction takes screen shots of the device in the form of images. Before, the only choice was to save these images onto the filesystem.Now, however, the screenshots can be saved directly into the database in the BinaryActionData table.
- Added SaveLocation flag enum to specify saving location (currently either in a file, in the database, or both)
- Fixed log font size on splash screen on pocket pcs
- Added Sleep function to ExecutableBase, which can be called from any script
- Added the HttpPostAction (this has not been tested, use at own risk)
- Added new action: SetWallpaperAction that sets the device's background wallpaper to the supplied image pointed to by the ImageFile property.

Monday, February 4, 2008

Website Updated

The MyExperience website hosted on SourceForge at http://myexperience.sourceforge.net has now been updated with a large dose of new content including more information on the tool itself, a list of contributors, details on how to access the MyExperience source code, and new contact information. Documentation on our Wiki at http://myexperience.wikispaces.com is also in the process of being updated.