Posted in Software on Saturday, Saturday, September 20, 2008 by Anthony Burns
If you're just looking for the application, then you need to visit the Quakk homepage.
If you're after having a peek at the code, contributing, criticising, or even stealing some of it for use in your own Twitter application, then you're in the right place. The solution can be downloaded from CodePlex
Some ideas I have to improve Quakk going forward, that you may be interested in helping with:
If you're interested in participating with the development of Quakk then hit me up: @littlecharva or leave a message on CodePlex or in the comments here.
Tagged as: quakk, windows mobile, twitter,
Posted in Software on Tuesday, Tuesday, July 29, 2008 by Anthony Burns
Yowsers! It's finally here, the final build of Quakk v1.0.
Here's a few things that have been fixed/tweaked since the last beta:
Copy the CAB file to your Windows Mobile device and run it, the CAB installer will install Quakk
and create a shortcut in your Programs menu.
You might need to download and install the .NET Compact Framework 2 if you're running Windows
Mobile 5 - if so, you can
download that here.
I don't know how much more I'm going to add to Quakk in the future, as I have other crazy contraptions I want to build, but I am planning on open sourcing it very soon, once I've had the chance to clean up the code.
Follow me on Twitter (@littlecharva) to keep abreast of any further updates.
Tagged as: quakk, windows mobile, twitter,
Posted in Software on Wednesday, Wednesday, July 16, 2008 by Anthony Burns
In order for Quakk to move out of the Beta stage it really needs an icon. If you fancy your skills as a designer and want your work to be on the screens of hundreds of people's mobile devices then send me your best shot. Twitter me @littlecharva.
Tagged as: quakk, twitter, windows mobile,
Posted in Software on Thursday, Thursday, July 10, 2008 by Anthony Burns
My addiction to Twitter has grown exponentially over the last month or so. I've gone from "I just don't get it" to developing a Windows Mobile application - Quakk - so I can check my Tweets on the go.
Twitter does me the favour of sending an email when when I receive a direct message, but doesn't bother when I recieve a reply - I'd prefer it the other way around. After browsing the list of available applications at the Twitter Fan Wiki I tried a few online services that claimed to monitor your replies and send notification emails, but was satisfied by none of them. The first one I tried wouldn't let me sign up due to database connection problems, and the second one sent my notifications sporadically. So I decided I could easily write my own monitor using the parts I've already developed for Quakk.
I've made the entire code for this project available to download at the bottom of this article, but if you're not a coder and you just want a copy of the application to use yourself, then that is available for download below too.
There are four classes from Quakk I'll be using: Configuration, TwitterApi, ReplyTimeline and Tweet. I've stripped out any code that's irrelevant to this project and detailed the public interfaces of these classes below, with the main code for the project below that. Please keep in mind that Quakk is still in the beta stage, so some of this code is a bit scruffy.
public class Configuration
{
public string LastID
public string Username
public string Password
public string EmailAddress
public string SmtpServer
public static Configuration LoadConfiguration()
public void Save()
}
The Configuration class deals with loading and saving your Twitter login credentials, email details and the ID of the last received tweet to an xml file. The static method LoadConfiguration() loads and parses the Xml file and returns an instance of the Configuration class populated with the details from the Xml file. These are made available as public properties, and a Save() method enables you to save any changes you make back to the Xml file.
public class TwitterApi
{
public string Username
public string Password
public string GetXml(string url)
}
The TwitterApi class takes care of connecting to Twitter, authenticating your user details and returning the response as a string. Create an instance of the TwitterApi, populate the Username and Password properties from your Configuration object and then call GetXml() on the desired url from the Twitter API.
public class Tweet
{
public string ID
public string DisplayName
public DateTime TweetDateTime
public string Message
public Tweet(XmlNode tweetXml)
}
The Tweet class takes an XmlNode as part of its constuctor which it parses and populates the public Properties from the data provided.
public class ReplyTimeline
{
public List<Tweet> Tweets
protected ReplyTimeline(TwitterApi twitterApi)
public void Update()
}
You pass in an instance of the TwitterApi to the ReplyTimeline class when you instantiate it which gives the ReplyTimeline the ability to connect to Twitter. When you call the Update method, it obtains the Xml for the 20 most recent replies from your Twitter account, parses it and creates a List of parsed Tweet objects which it makes available from its public Tweets property.
As you can see, by making use of these objects you can get a collection of Tweets live from Twitter in very little code.
// Load Configuration from Xml file, quitting if it doesn't exist
Configuration config = Configuration.LoadConfiguration();
if(config == null) return;
TwitterApi twitter = new TwitterApi
{
Username = config.Username,
Password = config.Password
};
// Update the Reply Timeline
ReplyTimeline timeline;
try
{
timeline = new Timeline(twitter);
timeline.Update();
}
catch(TwitterException)
{
// We could implement some sort of logging here,
// but since Twitter is down more than it's up
// I've opted to just quit the application here
return;
}
List<Tweet> tweets = timeline.Tweets;
At this point we have a generic List of Tweet objects from our Reply Timeline.
string emailBody = "";
// Iterate through each tweet returned from the timeline
// until we hit a tweet we've already seen
foreach(Tweet tweet in tweets)
{
if(tweet.ID == config.LastID)
{
break;
}
// Append the current tweet's details to our email body
emailBody += tweet.DisplayName + " replied:\r\n" +
tweet.Message + "\r\n\r\nAt: " +
tweet.TweetDateTime + "\r\n\r\n";
}
We iterate through the Tweet list building up an email containing the tweets we haven't seen yet.
// If we have tweet notifications to send then compose the email
if(emailBody != "")
{
MailMessage mail = new MailMessage(config.EmailAddress,
config.EmailAddress,
"New Reply Tweet",
emailBody);
// Send the email using the SMTP server specified in the config
try
{
SmtpClient client = new SmtpClient(config.SmtpServer);
client.Send(mail);
}
catch(SmtpException)
{
return;
}
// Update the ID of the last tweet in the config so we
// can identify if we've already seen it next time
config.LastID = tweets[0].ID;
config.Save();
}
Then we send out the email using the details from the config file, and update the config file with the ID of the last tweet.
You also need the following Configuration.xml file in the same directory as the application.
<?xml version="1.0"?> <Configuration> <LastID></LastID> <Username>Your Twitter Username</Username> <Password>Your Twitter Password</Password> <EmailAddress>billy@billy.com</EmailAddress> <SmtpServer>smtp.mysmtpserver.com</SmtpServer> </Configuration>
You can download the source in a VS2008 project, or if you're only interested in the application itself then download the app.
The application simply connects to Twitter, downloads your Replies, compiles an email of any new Replies and sends that email to you. In order to make use of it you should set it up as a scheduled task in Windows.
Tagged as: .net, csharp, twitter,
Posted in Software on Tuesday, Tuesday, June 10, 2008 by Anthony Burns
It took a little longer than I'd hoped to get a new update sorted, and I didn't get as many new features added as I'd have liked, but when it comes to a choice of beers in the sun with the boys, or sitting inside coding, you can guess which one wins out every time.
In this release I managed to get the colours working on replies (they now show up in green); the tweets now automatically resize depending upon how much text is in them; each tweet also displays the date and time it was sent; and you can now send a direct message from the context menu by clicking on a tweet. Behind the scenes I did a lot of tidying up the code, but you don't really care about that do you?
Copy the CAB file to your Windows Mobile device and run it, the CAB installer will install Quakk
and create a shortcut in your Programs menu.
You might need to download and install the .NET Compact Framework 2 if you're running Windows
Mobile 5 - if so, you can
download that here.
I don't think there's much more I'll add to Quakk going forward. I'd like to pretty the UI up a bit and try to implement some gradients for your aesthetic pleasure; I'll probably add one or two extra options to the context menu; and there are one or two bugs I've started to notice that need fixing.
I'm suprised that no-one has left any bug reports in the comments or twittered them to me - I've had an average of 30 hits per day to the Quakk tag in this blog since I posted a link on the Twitter Wiki, and although I haven't been able to record the download counts so far, I find it hard to believe that no-one has downloaded it or encountered a bug - come on folks.
Alternatively, if you've downloaded it and like it, then follow me on Twitter (@littlecharva) and send me some love baby!
Tagged as: quakk, windows mobile, twitter,
Posted in Software on Sunday, Sunday, May 25, 2008 by Anthony Burns
Just finished an update to my Windows Mobile Twitter client Quakk. You can download the latest version here:
Copy the CAB file to your Windows Mobile device and run it, the CAB installer will install Quakk
and create a shortcut in your Programs menu.
You might need to download and install the .NET Compact Framework 2 if you're running Windows
Mobile 5 - if so, you can
download that here.
Changes:
Bugs Fixed:
I now need to fix some smaller bugs, refactor the code (it's becoming a bit of a mess under the hood), extend the context menu (View User's Timeline, Send Direct Message, Unfollow, etc.) and tart up the UI a little.
I hope to have another beta update out within a week.
Any comments, bugs or feature requests, Twitter me @littlecharva.
Tagged as: quakk, windows mobile, twitter,