Nokia MixRadio: Search Task



In this article we will learn about the music search task in Windows Phone 8. This task uses the Nokia Mixradio Launcher. It allows you to search for music, artists, tracks or albums using the Nokia MixRadio app.

Music Search Task

Use the following procedure to use this task in your application:

  1. First include a reference for the Nokia MixRadio API "Nokia.Music.Wp8.dll" in your project.
  2. Create a new music search task.
  3. Set the search term for which you want to perform the search.
  4. Finally show the task using the show method.

To create a new music search task:

    MusicSearchTask task = new MusicSearchTask();

Now set the search term.

    task.SearchTerms = "Midnight";

Finally use the show method to open the Nokia mix app and show the search results:


Music Search Task Example











    FontFamily="{StaticResource PhoneFontFamilyNormal}"

    FontSize="{StaticResource PhoneFontSizeNormal}"

    Foreground="{StaticResource PhoneForegroundBrush}"

    SupportedOrientations="Portrait" Orientation="Portrait"



    <!--LayoutRoot is the root grid where all page content is placed-->

    <Grid x:Name="LayoutRoot" Background="Transparent">


            <RowDefinition Height="Auto"/>

            <RowDefinition Height="*"/>



        <!--TitlePanel contains the name of the application and page title-->

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">

            <TextBlock Text="Demo" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>

            <TextBlock Text="MixRadio Demo" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>



        <!--ContentPanel - place additional content here-->

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">

            <TextBox Name="srchTxt" HorizontalAlignment="Left" Height="72" Margin="0,10,0,0" TextWrapping="Wrap" Text="Enter Search Term" VerticalAlignment="Top" Width="456"/>

            <Button Content="Search" Click="SearchBtnClick" HorizontalAlignment="Left" Margin="268,87,0,0" VerticalAlignment="Top" Width="178"/>





C# Code Behind

In the following code I'm installing the Nugget Package Installer to install the Nokia MixRadio API in my application.

To install the MixRadio package in your project use the following command line:

PM> Install-Package NokiaMusic

After successful installation you will see the log similar to this:

Attempting to resolve dependency 'SharpGIS.GZipWebClient (≥'.

Attempting to resolve dependency 'Newtonsoft.Json (≥ 5.0.6)'.

Installing 'SharpGIS.GZipWebClient'.

Successfully installed 'SharpGIS.GZipWebClient'.

Installing 'Newtonsoft.Json 5.0.6'.

Successfully installed 'Newtonsoft.Json 5.0.6'.

Installing 'NokiaMusic 3.2.0'.

Successfully installed 'NokiaMusic 3.2.0'.

Adding 'SharpGIS.GZipWebClient' to Demo.

Successfully added 'SharpGIS.GZipWebClient' to Demo.

Adding 'Newtonsoft.Json 5.0.6' to Demo.

Successfully added 'Newtonsoft.Json 5.0.6' to Demo.

Adding 'NokiaMusic 3.2.0' to Demo.

Successfully added 'NokiaMusic 3.2.0' to Demo.


using System;

using System.Collections.Generic;

using System.Linq;

using System.Net;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Navigation;

using Microsoft.Phone.Controls;

using Microsoft.Phone.Shell;

using Demo.Resources;


namespace Demo


    public partial class MainPage : PhoneApplicationPage


        // Constructor

        public MainPage()





        privatevoid SearchBtnClick(object sender, RoutedEventArgs e)


            Nokia.Music.Tasks.MusicSearchTask searchApp =new Nokia.Music.Tasks.MusicSearchTask();

            searchApp.SearchTerms= srchTxt.Text.Trim();











That's all for this article. A future article will check the other methods of the MixRadio Launcher. In case of any doubt feel free to ask in the comments.