Iâ€™ve put together a basic photo uploader for the new Windows Phone 7. This was a good exercise for me as I had to a) make sure that the Flickr.Net library worked correctly in Windows Phone 7, and b) finally learn Silverlight, at least the basics anyway.
Well I had great fun, and Iâ€™m finally ready to share. You can download the files below.
Things I Learnt
There are a few things I learnt while doing this about the way to make great Windows Phone 7 apps, so I thought I would share.
One thing that was an interesting challenge was trying to make the authentication process work easily. Basically there are 3 pages to the app â€“ the photo chooser, the authentication page, and the upload page.
If you have already authenticated then it skips the authentication page.
If you authenticate and then go to the upload page I didnâ€™t want to back button to bring you back to the authenticate page again, I wanted to skip it. This is with the following code:
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
if (!String.IsNullOrEmpty(SettingsHelper.AuthenticationToken) && NavigationContext.QueryString.Count == 0)
Basically if you have already stored the authentication token then continue to move back if you can. I added in a check on the querystring in case you ever wanted to â€˜redoâ€™ authentication (this hasnâ€™t been implemented yet).
Here are the source files and the XAP file to download:
4 Replies to “Flickr Uploader for Windows Phone 7”
Unfortunately it doesn’t work on my LG. The first issue is that I cannot choose any picture (the screen is empty, no integration in my existing picture library) or take a new picture.
The second issue is with authentication: Even though I couldn’t choose a picture and got an error when I tried to navigate further, the navigation occured so I gave it a try and logged in into Flickr. This worked but the next step showed “Invalid frob (108)” in a message box. Of course, this is maybe because no picture was selected in the first place ;)
Where did you test, on a device or an emulator only, and what build did you use?
Apologies. I think there is an issue with the files I uploaded. I will update them to a working version later.
I don’t have a device myself, but I will upload the version that has been tested on a real device.
Great one…. Thanks… This is what exactly i am searching for !!! Thanks a ton