Using SkyDrive in your Windows Phone applications: part 1
In case you don’t know what is Skydrive, on Wikipedia you will find that “ Windows Live SkyDrive, initially called Windows Live Folders, is a free-of-charge file hosting service that allows users to upload files to a cloud storage and then access them from a Web browser.”
The Live Connect should recognize your application, that’s why you should go to Live Connect App Management site and create a new app.
You will get a Client ID and Client Secret that you will be using later with your application.
Demo : Sign In
Let’s see how it works now:
Create a Windows Phone Application and make sure to add the following references:
You should also add the SignIn Button to your toolbox :
In the main page, the user should sign in :
In the MainPage.xaml, I added a SingInButton control, You should put your own Client ID. I only used wl.signin and wl.basic scopes at this point.
wl.basic : Allows access to a user’s basic info, such as his or her Hotmail contact list.
wl.signin : Allows user’s log in .
The “infoTextBlock “ will indicate either the user is signed in or not. That will be handled in the C# code.
Run the application , hit the sign in button and you should get this screen:
In this first part, we grabbed the tools and SDK needed in order to use Skydrive in our Windows Phone applications.
Then we learnt how to sign in into Skydrive storage without writing any code.
In part two, we will learn how to read/insert files into Skydrive. Stay Tuned