Tuesday, March 9, 2010

WinMo Twitter Widget StarterKit

Are you interested in building simple Windows Mobile Apps to monitor twitter hash tags?  Check out the WinMo Twitter Widget StarterKit. 

http://tweetviewwidget.codeplex.com

When I was out at a couple conferences last year, I seemed to always be searching on twitter hash tags to see what was going on.  I decided to built a simple widget that I could quickly open, see the latest “happenings” and close it back down.

For MIX10 this year, an app I built and published it to Marketplace for Windows Mobile.  I used this as a basis and created a simple starter kit.  Not only can this quickly create a widget to monitor hash tags it gives you a good idea of what’s involved with creating widgets.

Enjoy

-twb

MIX 10 Tweets Widget on Windows Phone Marketplace

If you are heading to MIX and want to see what’s going on a great way to do this is follow a twitter feed.  People that use twitter add something called a hash tag to their tweets about MIX.  You can search for tweets with the #MIX10 has tag and you can keep track of events.  Since you may not have your laptop with you at all times a phone is a great way to track this.  Even better a Windows Mobile phone.  To make this even easier, I built a simple widget you can download and install a free widget via Market Place for Windows Mobile and install it on your Windows Mobile 6.5 phone.  Just search for MIX10 Tweets.

This Widget is now available on Windows Mobile Marketplace and can be downloaded on your phone by searching for it in the Social Networking category.

Here’s an overview of the MIX10 widget that can easily be customized and published to follow your own events.

The files can be downloaded from: http://tweetviewwidget.codeplex.com

There are five files that make up our widget:

  • config.xml – Manifest file that defines the structure of our widget
  • favicon.png – Icon to be displayed within the Program Menu within Windows Mobile
  • index.html – HTML that defines the content for our widget
  • logo.png – A simple graphic to be displayed in our widget
  • MIX10Tweets.widget – This is the package that gets deployed, it is really just a zip file that contains the four files where the zip extension has been renamed .widget

config.xml

Let’s start out with our Manifest file.  It’s simply an XML file.  Here’s the file for our widget

<?xml version="1.0" encoding="utf-8" ?>
<widget xmlns="
http://www.w3.org/ns/widgets" version="1.0"
                   uid="DFCE1FCF-6349-4dae-951D-F77AB5DE99C2">
    <content src="index.html" type="text/html" />
    <icon src="favicon.png" />
    <name>MIX 2010 Twitter Updates</name>
    <description>Follow the Twitter hash tag #MIX10 for Mix 2010 live from Las Vegas.</description>
    <author href="
http://www.TheWolfBytes.com" email="kevin@TheWolfBytes.com">Kevin D. Wolf</author>
    <version>1.0</version>
    <access network="true" />
</widget>

uid A unique GUID for this widget, it can be generated with Visual Studio.  This needs to be an attribute of the widget node.
content Add a src attribute that references the HTML for you the widget.
icon Add a src attribute that reference the 32x32 PNG file to be used as a launcher icon in the Windows Mobile Start Menu
name Name to be used in the Windows Mobile Start Menu
description A description to be displayed when the widget is installed on the device
author Your name, email and a link for a web site.
version Version of your widget
access If you need to access the internet as we do for our widget, add the attribute network=”true”

That’s it, pretty straight forward isn’t it?

favicon.png

This is the icon referenced in our manifest file with the <icon> element, it needs to be a 32x32 PNG.  Nothing too special here.

index.html

Our widget is really a very simple HTML page, a grand total of 71 lines.  I’ll assume you know a little about HTML, CSS, JavaScript and jQuery so I won’t go into too many details.  If not just practice your bing-foo and do a little searching.

Here are the highlights that make up our widget:

  • We are using JQuery so we have to download that from the internet.  We are pulling it from the Microsoft CDN at the URL "http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js”
  • After the page is loaded we call an init() function in the <body> tag, we do this rather than using JQuery to make our startup call in case we aren’t on line and can’t load JQuery.
  • Immediately we call performUpdate() which will update our tweets, we also call window.setInterval(performUpdate,30000 /*ms*/) so that the screen is refreshed every 30000 milliseconds or 30 seconds.
  • performUpdate() will invoke the jQuery method $.getJSON to query Twitter for “tweets” that include the has tag mix10.  The URL for that is simply http://search.twitter.com/search.json?lang=en&q=mix10
  • Next we just process the JSON returned from Twitter and display the results.
  • We wrap the entire call with a try/catch so if jQuery didn’t get loaded or our call to Twitter fails we display an error message.

That’s it, our resulting widget will look like:

FileVendor

For a complete tutorial on how to build advanced widgets, check out this link on MSDN
http://msdn.microsoft.com/en-us/library/dd721906.aspx

-twb

Tuesday, March 2, 2010

South Florida Code Camp

I learned my lesson, I need to do a better job of scheduling my travels as to not interfere with Florida code camps.  It sounds like much beer was drank and a good time was had by all.

image Credit @devfish for, ah, snapping the picture

Next on the agenda is Orlando Code Camp http://www.orlandocodecamp.com/. I heard a rumor that there might even be a room dedicated for Windows Phone 7 Series.  See you all there!

-twb

Wednesday, January 13, 2010

GotBalls! WiMo-GF Does!

I just deployed a sample page at http://www.wimo-gf.net/gotballs.htm to demonstrate image a non-trivial application built on top of WiMo-GF.  This sample runs on:

  • Windows Mobile
  • Silverlight
  • ZuneHD

You can download a CAB file to install the Windows Mobile version and if you have XNA SDK along with the Zune HD extensions you can download the Zune HD version.  In addition you can download the source code from http://wimogf.codeplex.com look for the sample labeled Collisions.

Now that I’m fairly happy with the rendering engine, I’m going to submit the Windows Phone version of GotBalls! to Marketplace for Windows Phone and make sure that games created with WiMo-GF can get approved.  Then the fun will begin!

WiMo-GF is an open source framework for building casual games to target mobile devices.  WiMo-GF is available at http://wimogf.codeplex.com and is currently in Alpha.

Ping me on twitter at @ByteMaster if you want to get involved.

-twb

Saturday, January 9, 2010

HTC HD2 Review

Just before Christmas, I dropped my Verizon Touch Pro 2 running a new shiny build of Windows Mobile 6.5.3 in the ocean.  Needless to say I was not pleased.  Saying that it may have been a blessing in disguise.  I had my eye on an HTC HD2 on ebay but just couldn’t justify dropping $800 for a new phone.  This gave me an excuse to help convince the wife that this was really required for my job.  A week later, the fed-ex man dropped off a package and I had an early Christmas.

I’m really glad I did this, although I was happy with my TP2, the hardware and the HTC Sense home page truly made this a completely different experience.  Yet, one that will hopefully pail in comparison to when we start getting new Windows Mobile 7 devices later this year.

Here are some of the features that make the HD2 what I believe is the best smart phone you can get today.  Some of which aren’t unique to the HD2, but the combination brings home the point and identifies what is possible.

Enjoyable Experience – Using the HD2 is an enjoyable experience.  Over the past year I really started to get the concept of User Experience.  This isn’t any one thing but there is a science to this.  It’s a combination of instantaneous response time, animation, providing the exact right information that is available with a minimal mount of interaction.  All of which the HD2 excels at.  image

HTC Sense Interface - I use my mobile device to try make sure little sparks don’t become big fires, keep up to date what is going on and keep in contact my clients.  The HTC Sense interface achieves this goal in spectacular fashion.  Within a second or two of unlocking the device, I can do a couple quick swipes of my finger and I’m up to date.  You may say, well that’s not really a Windows Mobile feature, I somewhat beg to differ.  Show me this type of home page on an iPhone, Android or Blackberry and we can have that discussion. 

Capacitive Touch Screen – The capacitive screen makes a big difference for accurately capturing gestures.  All my Windows Mobile devices before this one had a resistive interface, they worked fine, but this one works flawlessly.  It’s very seldom that my gestures or touches get misinterpreted.  Multitouch is also a nice added bonus on applications that support it.

Touch Access – The HD2 doesn’t have stylus nor does it need it.  With the huge screen you can access all the features/functions by just touching the screen.

Performance – What can I say, the 1GHz processor makes simple work of most tasks.  The device is extremely responsive.

1/8” Headphone Jack – I really like the ability to just plug in a set of headphones and as much as I like my ZuneHD, I find I’m starting to use this device as my media player.

MicroSD Card – Pop in a cheap 16GB SD card there’s plenty of room for music and TV shows.

Display – the 4.3” display is HUGE.  If you like big displays this is for you.  In some cases the size of it makes it a little difficult to use with one hand, but as with everything there are trade-offs.

5MB Pixel Camera and Flash – Although I’ve had devices in the past that claimed to have a built in flash, they really didn’t work all that great.  The flash in this device works great.  The pictures from the 5MB camera are also very impressive.

Battery Life – So far, I’ve been very happy with the battery life of this device.  Although I haven’t really done any formal tests, in most cases I have WiFi turned on and it seems like I’ve never picked it up and was surprised that the battery was unexpectedly drained.

Micro USB – At first I was somewhat annoyed by the fact this device didn’t use the standard Mini USB, but rather the Micro USB, the smaller flatter version.  I’m starting to like it, I can’t exactly describe why but it seems like it’s a better fit, or maybe it just a sleeker look.  It seems like a number of other newer devices including my Sprint MiFi and the wife’s Omina II both use this connector.

Microsoft My Phone – Set it and forget it.  If you aren’t using this program you should.  This really works well if you have multiple devices like I do.  It’s nice to have all your pictures, text messages and documents sync between your different devices. 

The Bad

Overall I’m very happy with this device, I have two complaints however.  Since I didn’t get the device from a carrier, it doesn’t have support for 3G on T-Mobile.  This is a minor gripe, I just don’t do that much surfing.  My major gripe is that even with this expensive device HTC continues to ship their devices with the software reference drivers for DirectDraw.  Most users probably don’t even realize this, but the device supports hardware acceleration for the display and has the potential for stunning 3-D graphics.  It’s sort of like purchasing a Ferrari but only 2 of the 8 spark plugs are installed.

Summary

Using the HD2 as my primary device raised the bar on what I expect from a mobile device.  It’s currently expensive but as soon as it comes to T-Mobile this will probably be the best phone you can get your hands on.

-twb

Saturday, January 2, 2010

MVP Award for 2010

Yesterday morning the twitter stream came alive with people updating their status with receiving their 2010 MVP awards.  I knew I was nominated for the award but didn’t want to get my hopes up.  I didn’t receive any emails.

Then I decided to check in my junk mail folder a was greeted with a rather innocent looking email.

image

What a great way to start out the year!

-twb

Friday, December 4, 2009

Windows Phone Camp Resources – Windows Mobile Tools, Tips and Tricks

The following are resource links as discussed in my talk “Windows Mobile – Tools, Tips and Tricks”

- Slides and Source from Presentation

- Windows Mobile Developer Center

- Differences between Compact Frameworks, Full .NET Frameworks

- Windows Mobile Device Center

- Windows Mobile 6.0 SDK Refresh

- Windows Mobile 6.5 DTK (Developer Tool Kit)

- How Do I? Videos for Devices

- SOTI Pocket Controller Pro

- Speeding up Compact Frameworks Builds

- State and Notification Broker

- Great List of “How-To” items for Compact Frameworks

- Windows Mobile 6 Documentation

- Location of System_SR_ENU.cab (used for displaying useful error messages)
   %Program Files%\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\Diagnostics

- twb