Windows Phone: Sharing Content

If you writing an app and want to add some social sharing capabilities like posting link to Facebook or twitter. Your initial approach may be to go to and check out each of their api’s or to go to codeplex and search for a C# api someone’s written that makes the integration simpler. But right from that start Windows Phone has had a much simpler way of doing things.

The ShareLinkTask provides a simple way to post messages to any social network the user has registered on their phone. You don’t need to do anything with authorising your app with facebook etc which not only makes things easier for you, but your users are also pleased as they don’t have to worry about what you may be doing with their passwords.

It also only takes 4 lines of code. Simply create an instance of the ShareLinkTask, set the tile and message and call the show function:

ShareLinkTask shareLinkTask = new ShareLinkTask(); 
shareLinkTask.LinkUri = new Uri("http://www.himynameistim.com");  
shareLinkTask.Message = "Check out this great blog"; 
shareLinkTask.Show(); 

As well as the ShareLinkTask there is also a ShareStatusTask and ShareMediaTask that can be used if you just want to post a status update or post and image.

ShareStatusTask shareStatusTask = new ShareStatusTask();

shareStatusTask.Status = "I'm developing a Windows Phone application!";

shareStatusTask.Show();

           ShareMediaTask shareMediaTask = new ShareMediaTask();
           shareMediaTask.FilePath = path;
           shareMediaTask.Show();
       

Social media isn’t the only way of sharing content on a phone though, there is also email and sms. Both of these are just as easy to do as social media though:

For email use the EmailComposeTask

EmailComposeTask emailComposeTask = new EmailComposeTask(); 
emailComposeTask.Subject = "Awesome website"; 
emailComposeTask.Body = "Foo bla bla"; 
emailComposeTask.Show(); 

And for SMS use the SmsComposeTask

SmsComposeTask smsComposeTask = new SmsComposeTask();

smsComposeTask.To = "2065550123";
smsComposeTask.Body = "Try this new application. It's great!";

smsComposeTask.Show();

For more information have a look at the MSDN documentation:

Share Link Task – http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394009(v=vs.105).aspx

Share Status Task – http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394027(v=vs.105).aspx

Share Media Task – http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207027(v=vs.105).aspx

Email Componse Task – http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394003(v=vs.105).aspx

SMS Compose Task – http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394005(v=vs.105).aspx

Sill organising email into folders? Then STOP!!!

About a year ago I was listening to a podcast to do with work and productivity and one of the subjects being discussed was email management and not letting it take over you life.

At work we all receive a lot of emails, in-fact recent stats shows light users receive 180 emails a week, heavy users receive 2100 emails a week. Now most of these go in the trash or get picked up by spam filters, but a lot is still emails from colleges needing action, some can be deleted and some just need to be kept for the future. With the ones needed for the future a lot of us file them into folders (often organised by projects) so that they can easily be found in the future.

But when that future date occurs you discover that your folders are actually full of hundreds of emails. Worse still a lot of them were items that could probably have been deleted a couple months after reading them. Now theres no way of finding the one you wanted by looking through the list, so your only option is to use a search to find the email you wanted. This is ok though as searching emails actually works quite well now. But if searching actually works well now and we’re going to do it anyway, what was the point in all that time you spent filing emails into individual folders?

So here’s my recommendation. Create 2 folders one called Keep Forever and the other called Keep for 6 Months. Set a rule on the 6 month folder so that anything older than 6 months get automatically deleted (if your concerned you can always make the rule for a year). Then when emails come in if it needs actioning leave it in your inbox, if you need to keep it forever and move it to the forever folder and if it’s something that might be needed over the next few weeks put it in the 6 month folder. This way you inbox is kept small with things you need to reply to, you still have all your emails to search in the future, and the crap that is only relevant for the next few months will be deleted automatically in 6 months time.

Going Further….

In Outlook you also have the ability to tag an email with categories (or multiple categories), each category is also colour coded. An extra step you can take is to choose a category for each email that comes in that your going to keep or need to action. e.g. I tag my emails with a client category.

This is much simpler than organising into folders as you can do it as you receive/read emails (not when filing), you get the benefit of being able to find emails to action in your inbox visually by colour, and when you need to search in the future you also have the power of the category filter.

Give it a try for a few months and then wonder why you spent all that time filing emails.