silverlightwindows-phone-8.1windows-phone-emulator

How to test auto-launch on Windows Phone 8.1 Emulator


I am new to Windows Phone app development and currently writing a Silverlight app for Windows 8.1.
I was able to follow the Microsoft instruction to have my app associating a particular file extension.

Now a rather stupid question, how do I test this functionality in the Emulator ?
Let's say I have a associated file on the "SD card", how would I browse to that file and open it. Or is that completely unnecessary and I am overthinking that feature?

Based on arya404's answer I added a test button to my app which launches a local file.
Button itself:

<Button x:Name="button" Content="Test" Click="test_button_clicked"/>

The button's code:

private async void test_button_clicked(object sender, RoutedEventArgs e)
{
    StorageFile myFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("local.file");
    await Windows.System.Launcher.LaunchFileAsync(myFile);
}

Solution

  • Have you tried to open the file through the Files application ? https://www.microsoft.com/en-us/store/apps/files/9wzdncrfj3pl