Introduction
In this article, we will create a Flickr album viewer using Windows Phone App Studio. In my previous articles, we learned how to use a YouTube Data Source in Windows Phone App Studio. In this article, we will learn about a Flickr Data Source.
About Flickr Data Source
This Data Source is similar to a YouTube Data Source. You need to enter the search keyword or user id. The Data Source will automatically grab the pictures from the Flickr website. If you choose the search option, then the result will be the same as when you get it by searching in the website. If you select the “user
” option, then the application will show the images from that Flickr user account.
Finding Flickr User ID
If you want to integrate any user account with this Data Source, then you need to find the user id of that account. The best way to find the user is using this tool.
- User ID
- Enter the user profile URL and you will get the User Id associated with that account.
Creating Flickr Album Viewer
So now it’s time for action. Let’s start building our app in a step-by-step manner.
- Open this link to launch Windows Phone App Studio http://apps.windowsstore.com/default.htm
- Click on “Start Building”
- Click on “Create an Empty Application”.
- Set the App logo. It should be good enough to reflect your App motive.
- Set the App title and Description. The App title is what will be visible on the Phone App list. Now click “Next”.
- Click on “Add section” and select “Add section” from the pop-up.
- Enter a section name. This will be visible on the App main screen.
- Select the Data Source type as “Flickr”.
- Enter the Data Source name. It should be unique within the application. To save changes, click “Save Changes”.
- To show the details of an image, let’s add one more detail page.
- To add a detail page, click on the “+ Add Page” icon.
- Enter the page name and click “Ok”.
- Click on “Save changes” to save the settings.
- Now click on the Data Source we have added.
- Select “Search” from the drop down list as we will be using a search keyword for this application.
- Enter your search keyword.
- Click on “Refresh” and you will see the Image list below it if everything is correct so far.
- Click on “Save changes” to save the settings.
- Click on Section page “Flick” to change the layout. The standard for image viewer layout is to have an Image grid layout. It is also a default layout for the Flickr Data Source.
- Select the suitable layout of your choice.
- Next is Binding. Bind whatever you want to show in your screen. In this demo, I’m using an Image grid layout so I need to bind only an image with
Data.Image
.
- For title, use whatever you want. It will be visible on the main screen.
- Here
DATA
represents an Image
Object. You can see various Image
properties in the binding list.
- Click “Save changes”.
- Now click on the detail page “
Image
” just below the Section page.
- Choose the layout and appropriate binding settings.
- To enable the user to pin a specific image to the start, click on “Extras”
- Disable “Text To Speech” since it is not required on this page.
- Enable Share Text if you want to allow sharing.
- Enable
PinToStart
to allow the user to pin that image in the Start.
- Click on “Save” to save the settings.
- Click on “Detail” that is next to “Image”.
- Choose the layout for the image detail and bind it with the appropriate
Image
attributes.
- This page can be viewed by a user by swiping the screen to the left.
- Click on “Save changes” to save the settings.
- Click on “Next”. On the next page, you can set the appearance of your app.
- For setting the appearance, you can check my article “windows-phone-app-studio-part-2”. That article mainly focuses on the Appearance settings of an app.
- After setting the appearance, you can generate your app.
- The generated app can be used in a Phone Device or it can be published in the Market Store as well.
Summary
In this article, we learned how to use a Flickr Data Source for creating Flickr photo view applications. You can also use the “User ID” option of this Data Source. Don’t forget to share and comment.
Output
Filed under: CodeProject, Windows Phone