New features in Windows Phone 8: Start another program from one application (File Association and Protocol Association)

Source: Internet
Author: User
 

1. Start the phone to pre-install the built-in program to open the file association

Here is an example of opening a Word document.


	string fileToLaunch = @"HelloKitty.docx";

        // Launch a .docx file that came with the package.
        private async void LaunchFileButton_Click(object sender, RoutedEventArgs e)
        {
            // First, get the word file from the package's doc directory.
            var file = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(fileToLaunch);

            // Next, launch the file.
            bool success = await Windows.System.Launcher.LaunchFileAsync(file);
            if (success)
            {
                
            }
            else
            {
                
            }
        }


2. Start the mobile phone and install the third-party program protocol Association.

A. First define a third-party program that complies with the Protocol Association Protocol

Protocol association needs to be registered in wpappmanifest. XAML;
To register protocol assocation, you must use the XML (text) editor to open wpappmanifest. XAML;
The following code must be added after </token>:
<Extensions> <protocol name = "MKV" navurifragment = "encodedlaunchuri = % s" taskid = "_ default"/> </extensions>

B. Start third-party programs that support the MKV Protocol

Windows. system. launcher. launchurchill iasync (New uri ("MKV: hellokitty "));

The associated URI retained by Windows phone8,Note: ":" Before the keyword

bing: [keyword] Open bing and search by keywords
callto:
dtmf:
http: [url] Open the specified URL in a browser
https: [url] Open the specified URL in a browser
maps:
mailto: [Email] Open the mail interface and send mail to the specified contact
ms-excel:
ms-powerpoint:
ms-settings-accounts:
ms-settings-airplanemode: Turn on the flight mode settings switch
ms-settings-bluetooth: turn on the Bluetooth settings switch
ms-settings-cellular: Turn on network settings for mobile phones
ms-settings-emailandaccounts: turn on email + account settings
ms-settings-location: turn on the location settings switch
ms-settings-lock: Turn on the lock screen settings switch
ms-settings-wifi: turn on the wifi settings switch
ms-word:
office:
onenote:
tel: [phone number] Open the dial interface to call the phone. For the omitted phone number, you can directly enter the dial interface if you are currently in a call.
wallet:
xbls:
zune: navigate? appid = [app ID] Opens the Windows Phone store and displays the details page for the specified application.
zune: reviewapp
zune: reviewapp? appid = [app ID] Opens the Windows Phone Store and displays the rating and review page for the specified application.
zune: search? keyword = [search keyword] & publisher = [publisher name] & contenttype = app
Open the Windows Phone store and search for applications by the keywords you set. Note that all parameters here are optional and support Chinese and English keywords. 

4. For the built-in file types and retention types supported by the system, refer to msdn
Reserved file and Uri associations for Windows Phone 8

 

 




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.