04 | handling files in windows store...
TRANSCRIPT
![Page 1: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/1.jpg)
04 | Handling Files in Windows Store Apps
Jerry Nixon | Microsoft Developer Evangelist
Daren May | President & Co-founder, Crank211
![Page 2: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/2.jpg)
![Page 3: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/3.jpg)
Microsoft
Virtual
Academy
File Namespaces
![Page 4: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/4.jpg)
File Namespaces
• Windows.Storage.StorageFolder– Copy, Move, Rename, Delete
• Windows.Storage.StorageFile
• Copy, Move, Rename, Delete
• Windows.Storage.FileIO– Read, Write, Append methods
• Windows.Storage.Pickers– Folder, save/open File, Third Party
Capabilities and Strategies
• AppxManifest Capabilities
• App Storage (readonly)– “ms-appx://folder/file”
• Local Storage
• “ms-appdata://local/folder/file”
• “ms-appdata://roaming/folder/file”
• “ms-appdata://temp/folder/file”
File Namespaces
![Page 5: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/5.jpg)
Read from Isolated Storage
![Page 6: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/6.jpg)
Read Project Files
![Page 7: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/7.jpg)
With a file picker
![Page 8: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/8.jpg)
Without a picker
![Page 9: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/9.jpg)
Microsoft
Virtual
Academy
Process Lightcycle Lifecycle Management
![Page 10: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/10.jpg)
![Page 11: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/11.jpg)
![Page 12: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/12.jpg)
The User
Activates
Your App
splash screen
![Page 13: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/13.jpg)
The User
Activates
Your App
splash screen
![Page 14: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/14.jpg)
Trigger Condition
InternetAvailable,
InternetNotAvailable,
SessionConnected,
SessionDisconnected,
UserNotPresent,
UserPresent
TimeTrigger*
PushNotificationTrigger*
SessionStart*
ControlChannelTrigger*(**)
ServicingComplete
SessionConnected
SessionDisconnected
SmsReceived
TimeZoneChange
UserAway/UserPresent,
LockScreenApplicationAdded/Removed
OnlineIdConnectedStateChangeInternetAvailable
InternetAvailable/InternetNotAvailable
NetworkNotificationChannelReset
NetworkStateChange
MaintenanceTrigger
PushNotificationTrigger** *requires lock permission
**can run in App (not BackgroundHost.exe)
![Page 15: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/15.jpg)
Microsoft
Virtual
Academy
Activating Windows Store Apps
![Page 16: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/16.jpg)
ActivationPrimary
Tile
Secondary
Tile
Toast
Notification
Share
Target
Search
Contract
File
Activation
Protocol
Activation
Resume
![Page 17: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/17.jpg)
File Activation
• AppxManifest Declaration– MIME Type
– Extension (File Type)
– Tool Tip
– Display Name
– Logo
• Reserved Words like: – Com, Exe, Lnk
• Can have command arguments
• Search the Store
Activations
![Page 18: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/18.jpg)
Protocol Activation
• AppxManifest Declaration– Protocol
– Display Name
– Logo
• Reserved Words like: – Ms-windows-store
– InternetShortcut
• Using URL://Data/Data/Data
• Search the Store
Activations
![Page 19: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/19.jpg)
Microsoft
Virtual
Academy
State Management Strategy
![Page 20: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/20.jpg)
1. Resume as the user left it
2. Start fresh if a long period of time has elapsed
3. Save data when suspending (5 seconds)– Save along the way
4. Release exclusive resources
State Management Guidelines
![Page 21: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/21.jpg)
• Comes with some Visual Studio templates
• RegisterFrame(frame), SaveAsync(), RestoreState()
Helpers :: Suspension manager
![Page 22: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/22.jpg)
• Orientation Events– Visual State Changes
• SaveState(suspension), LoadState(suspension)
Helpers :: Layout aware page
![Page 23: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/23.jpg)
State Management
![Page 24: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/24.jpg)
![Page 25: 04 | Handling Files in Windows Store Appsdownload.microsoft.com/download/A/5/8/A5841BF7-8999-40F9...File Handling Author Richard Harrison (Content Master Ltd) Created Date 5/2/2013](https://reader034.vdocuments.mx/reader034/viewer/2022042802/5f3ad5fb16f28063be3a9469/html5/thumbnails/25.jpg)
©2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics and other product names are or may be registered trademarks and/or trademarks in
the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because
Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information
provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.