New feature for Windows Phone 8: Access to SD card

Source: Internet
Author: User
 

Windows Phone 8 has added support for the SD card. developers can directly access the unencrypted content of the SD card, but cannot perform the write operation.

In addition, you can copy approved applications to the SD for installation. You only need to connect your mobile phone to the marketplace for verification during the installation process.ProgramYou can directly install and use it.

CodeId_cap_removable_storage is required for SD card operations,

Use code snippets to reference the official route mapper sample example. For the complete example, go to: Click to open the link.

 

// Process a route from the SD card. private async task processsdgpxfile (string _ sdfilepath) {// connect to the current SD card. externalstoragedevice sdcard = (await externalstorage. getexternalstoragedevicesasync ()). firstordefault (); // If the SD card is present, get the route from the SD card. if (sdcard! = NULL) {try {// get the route (. GPX file) from the SD card. externalstoragefile file = await sdcard. getfileasync (_ sdfilepath); // create a stream for the route. stream S = await file. openforreadasync (); // read the route data. readgpxfile (s);} catch (filenotfoundexception) {// The route is not present on the SD card. messageBox. show ("that route is missing on your SD card. ") ;}} else {// No SD card is present. messageBox. show ("the SD card is mssing. insert an SD card that has a routes folder containing at least one. GPX file and try again. ");}}

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.