Showing posts with label addin. Show all posts
Showing posts with label addin. Show all posts

March 1, 2008

Facebook Status application 0.3 released

Version 0.3.0.0 is now released.

New features
  • Exclude program titles from status updating using Regular Expressions
  • User customizable status polling interval
  • User customizable setting whether status is cleared when WMC is closed
  • Status may be logged to a XML file
  • Debug option for only showing the status changing messages in WMC and not updating them to other destinations
All of the values are configured in registry in HKLM\SOFTWARE\Hamar Data\FBMCE (settings common for all users) and HKCU\SOFTWARE\Hamar Data\FBMCE (user specific settings, marked with * on the following list).

Registry keys:
  • ClearStatusOnExit - 1 to clear status when exiting WMC. Default is 0.
  • Debug - 1 to enable debug mode when status changes are only shown in WMC. Default is 0.
  • EventsEnabled_Service_Facebook - 1 to enable status updating to Facebook. Default is 1.
  • EventsEnabled_Service_Xml - 1 to enable status updating to an XML file. Default is 0.
  • EventsEnabled_[MEDIA_TYPE] - 1 to enable status updating for the given media. Default is 1.
  • Exclusion_[MEDIA_TYPE]_RegExp - Regular Expression defining what media titles to exclude from status updating. Default for TV is No data available, for others default is empty.
  • PollingInterval - Polling interval in milliseconds of how often media status is queried. Default is 10000.
  • Service_Xml_File - XML file where status is stored if EventsEnabled_Service_Xml is set to 1. Default is status.xml. This must contain also a path.
  • Secret* - Facebook related information for infinite sessions. If you wish to clear the infinite session selection you made, clear this value and restart WMC.
  • SessionKey*- Facebook related information for infinite sessions. If you wish to clear the infinite session selection you made, clear this value and restart WMC.
  • UserId* - Facebook related information for infinite sessions. If you wish to clear the infinite session selection you made, clear this value and restart WMC.
Facebook application page is here. Direct link to new version is here.

February 15, 2008

New version of Facebook Status application, 0.2.1

Hooray! To celebrate the launch of the application I bought myself a beer and enjoyed it on front of Visual Studio 2008. I know - it is kind of naughty, as it is only Thursday today. Or was...

Anyways, finished working with the application for tonight and uploaded a new version, 0.2.1, here.

At some point I'll maybe learn the WiX secrets of minor/major upgrades so that the MediaState won't have to be reinstalled every time as it is the one that requires the two Vista restarts. So for now just sit back and relax and think of the summer, which is apparently on its way, while waiting for the restarts to complete.

Changes:
  • Supports Facebook infinite sessions
  • Status updating may be enabled/disabled for each media type separately.
    • Currently this is done by modifying registry values (EventsEnabled_...) in HKLM\Software\HamarData\FBMCE or HCL\VirtualStore\Machine\Software\HamarData\FBMCE.
There were some strange behavior regarding the VirtualStore as I only learned about it a few hours ago, but as far as I know, you should find the registry values in the VirtualStore hive.

Coming soon...which will be after my winter holiday in few weeks: Ability to filter out certain Status updates (with RegExp) based on the title of the media...:P

February 12, 2008

Media Center Add-In for updating Facebook Status

I was at TechEd EMEA in Barcelona for the first time in 2007. Although I've been lately working a lot with MOSS 2007, I tried not to go on too many MOSS sessions. Instead I enjoyed some excellent MS Robotics Studio, Silverlight, XNA, Media Center sessions.

On the Media Center session I learned how to make simple add-ins to the new Media Center that comes with Vista. Of course, it all seems so easy when you're looking at a practiced session. In practice there were several issues I ran into.

Nevertheless, here it is: a Vista Media Center Background add-in that updates your Facebook user status according to what you're watching/listening on Media Center. So, if you're watching a program called "News" on Media Center, soon your Facebook status will say "...is watching News". In the same way the DVD, Recorded TV and Video title is shown. If you're watching pictures status will just be "...is watching pictures". When listening to music status will be "...is listening to ARTIST - TITLE".

Add-in checks Media Center MediaState every 10 seconds and only connects to Facebook and changes the status if change in MediaState is detected. It also handles the Extended Permissions situation as users need to give the application permissions to update user status. Add-in uses Facebook.NET libraries for most of the Facebook related operations.

Extenders are not currently supported since Facebook login must be done using a specific URL and even if I would create a separate Add-In to take care of the login (instead of using Windows Forms) I couldn't have any browser control in that add-in (in MCML). This thing is subject to change as I investigate the other ways to accomplish this.

Please give it a try and let me know what you think. If you have questions and/or problems, please post them in Facebook so that they'll be in one place.

Requirements
  • Vista Home Premium or Ultimate
  • .NET Framework 2.0

Quick instructions
  1. Install using setup.msi, restart is required
  2. Start Media Center
  3. Separate Windows Forms window is opened where you must login to Facebook.
  4. If this is the first time running the add-in a notification is shown that you have to give the Extended Status update permissions
  5. Extended permissions Windows Forms window is shown. Grant the permission, and close the form.
  6. Add-in runs in background updating your Facebook status.
Later when Media Center is started, only Facebook login is required (if you haven't checked the persistent login checkbox).

Facebook application page is here. See the front page of my blog for latest version information of the AddIn.