Windows Phone Concept - 7.1 & 8 Preview

1,147 views

Published on

介紹相關Windows Phone 7.1 SDK開發的概念與Windows Phone 8 SDK的Preview介紹。

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,147
On SlideShare
0
From Embeds
0
Number of Embeds
25
Actions
Shares
0
Downloads
22
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Windows Phone Concept - 7.1 & 8 Preview

  1. 1. Pou Mason poumason@live.com http://www.dotblogs.com.tw/pouWindows Phone 技術分享
  2. 2. 大綱Windows Phone SDK 7.1 – Architecture – Execution Model for Windows Phone – Using Isolated storage – Using Live Tile & Controls – Chooser and Launcher – Multitasking for Windows Phone即將到來的Windows Phone 8
  3. 3. Windows Phone SDK 7.1
  4. 4. ConceptWindows Phone SDK 7.1 ArchitectureRuntime, Tools, Cloud Services, Portal ServicesApplication Development Lifecycle
  5. 5. Architecture – 1/2
  6. 6. Architecture – 2/2Runtime – Silverlight and the XNA FrameworkTools – Visual Studio, Expression BlendCloud Services – Windows Azure, XBOX Live, Notification Services, and Location Services, …Portal Services – Windows Phone Marketplace
  7. 7. Runtimes
  8. 8. Application Development Lifecycle
  9. 9. Silverlight & XNA FrameworkSilverlight – 適用開發應用程式類的App,也可以開發遊戲 – WP與Windows在Silverlight的不同 • Implementation Differences Between Silverlight and Silverlight for Windows PhoneXNA – 適用開發遊戲與多媒體應用程式究竟該開發那一種與選擇Framework • The Silverlight and XNA Frameworks for Windows Phone
  10. 10. Execution Model – 1/6Windows Phone應用程式的生命週期類型 – Application State – Application Events – Page State – Page Events – Tombstoning – State Dictionaries
  11. 11. Execution Model – 2/6Application – Data that is used by multiple pages in an application.Page – The current visual state of a single application page. Page Page Page Application
  12. 12. Execution Model – 3/6Application Events – Launching – Deactivated – Activated – ClosingPage Events – PhoneApplication Page • OnNavigatedTo • OnNavigatedForm
  13. 13. Execution Model – 4/6Tombstoning (墓碑) – 應用程式久未使用或被回收,非走Closing離開 程式,應用程式被視為墓碑 – App裡的所有資源被回收Terminated (休眠) – 應用程式從前景換到背景,未被回收時,視為休 眠模式 (或稱暫停) – 資源仍存在,回到App時可以繼續使用搭配Deactivated與Activated Reference: Windows Phone 7 - 簡介新運作模式 - Dormant
  14. 14. Execution Model – 5/6Deactivation – 代表App將由前景轉換背景模式前的事件 – 保存Page或Application中必要的資料Activation – 代表App由背景轉換前景時的事件 • 背景轉前景與由Start再啟動App完全不同 – iOS / Android 二個視為相同 – 還原必要資料至Page或Application
  15. 15. Execution Model – 6/6 (1)Application Lifecycle (6) (2) (5) (4) (5’) (3) (‘4)
  16. 16. Page之間的切換 – Navigation – 1/2PhoneAlicationFrame – 一個Application有一個Frame – 工作 • PhoneApplicationPage之間的資料交換 • 結合App.xaml控制ApplicationPage內的內容與控件 • 控制PhoneApplicationPage的切換PhoneApplicationPage – Application呈現的單位,UI控件的集合處 References: Navigation Framework原理概論
  17. 17. Page之間的切換 – Navigation – 2/3關聯模塊
  18. 18. Page之間的切換 – Navigation – 3/3Page切換原理
  19. 19. Isolated Storage – 1/3Application專屬儲存區 – Sandbox機制,每個App具有獨立的I/O空間 – App之間無法交換資料 – 無法辦法直接訪問File System取得資料 – 提高安全性,降低未經授權的訪問和數據損壞的 可能性
  20. 20. Isolated Storage – 2/3Data Storage Options
  21. 21. Isolated Storage – 3/3Special-use Folders Path Use Note Shared 管理Media、ShellContent與 App安裝時自動建立,可 Transfer三個資料夾。 被刪除。 Shared/Media Album Art:App利用該資料夾呈 App安裝時自動建立,可 現Album Art,配合Background 被刪除。常搭配多媒體應 Audio一起使用。 用時,儲存媒體資料。 Shared/ShellContent Application Tiles: 用於呈現每個一 App安裝時自動建立,可 Tile在Font/Back的底層資訊,配 被刪除。配合Live Tiles時 合Live Tiles時使用。 使用。 Shared/Transfer Background file transfer:用於存放 App安裝時自動建立,可 背景下載的檔案,配合 被刪除。配合Background Background Transfer元件使用。 Transfer元件使用。 – 也可依需求建立自訂的目錄結構
  22. 22. Isolated Storage vs. XAPIsolated Storage – App安裝後所產生的儲存區XAP Resource – XAP為App實際安裝檔 • 與Android中的Assets相似 – 可在應用過程裡,直接將XAP中的資訊Copy至Isolated Storage進行操作 – XAP裡的資料是不可以修改 – XAP中的資料隨著專案打包時 • Content 與 Resource包裝上的差異Reference: Windows Phone 7 – TitleContainer.OpenStream與App.GetResourceStream - 讀取XAP內資源的方法
  23. 23. Local Database – 1/2Architecture – DataContext • 輕量的Entity Framework – 沒有工具,要描述一個DB,全部要手動建立 – LINQ to SQL Runtime • 所有的交易一律透過OR Mapping,沒有SQL References: Windows Phone 7 – Local Database概論 - 2
  24. 24. Local Database – 2/2Supported Properties – data source : isostore/appdata – password : 40 characters • AES-128, SHA-256 – max buffer size: 384~5120 (kilobytes) – max database size: 32~512 (megabytes) – mode • read write/read only/exclusive/shared read
  25. 25. Live Tile – 1/3Tile – WP獨特的概念元素,可呈現App資訊、互動項 目與通知內容 – 搭配Push Notification、Schedule排程等,動態 的調整Tile的內容 – Tile的動態特效,由系統控制,到了WP8有更豐 富的呈現機制
  26. 26. Live Tile – 2/3Application Tile – The font of a tile – Only oneSecondary Tiles – The back of a tile – User can custom References: Windows Phone 7 - 學習新的Secondary Tile與Application Tile
  27. 27. Live Tile – 3/3修改Tiles的機制 – ShellTile APIs • Application Tile and Secondary Tiles can be created, updated, and deleted – Tile Notifications • Tile properties can be updated by using the Microsoft Push Notification Service – ShellSchedule APIs • The background images on the front of a Tile can be updated on a recurring schedule, even if your application is not running.
  28. 28. Controls & ToolkitsControls – Supported Controls in Windows PhoneSilverlight for Windows Phone – Silverlight for Windows Phone ToolkitUnsupported controls – ComboBox, TreeView, OpenFileDialog, …
  29. 29. Chooser & LauncherLaunchers and Choosers Overview for Windows PhoneChooser – 呼叫系統內部應用程式,並有回傳值 – Choosers for Windows PhoneLauncher – 呼叫系統內部應用程式,執行固定任務 – Launchers for Windows Phone References: Windows Phone 7 - 更多元的Microsoft.Phone.Tasks
  30. 30. MultiTask – 1/2Background Agent – 獨立於App之外的特殊背景元件 • 建置時屬於不同的專案 – Android, iOS中不具有該類項目,但各自有對應的背景機制 – 與App之間無法直接溝通 • 統一透過Isolated Storage進行資料交換Lifecycle – 一個App只有一個Agent – NotifyComplete(), Abort() – ScheduleToast
  31. 31. MultiTask – 2/2Background Transfer – 提供佇列一至多個檔案在背景下進行上傳、下載Background Audio – 支援App在非前景下仍可以播放音樂Background Schedule Tasks – 支援安排App在背景時可以處理特定的任務 • Periodic Task – 適用執行較短時間的任務,執行隔間具有規律週期性 • Resource-intensive Task – 適用需要執行較長時間的 任務,只有設備在指定狀況下使用
  32. 32. Application FeaturesApplication Features for Windows Phone – Application Bar – MusicHub, Picture Hub – Contacts and Calendar – Location, Media – Push Notification –…
  33. 33. ReferencesGesture Support for Windows PhonePerformance Considerations in Applications for Windows PhoneCode Samples for Windows PhoneWindows Phone Training CourseWindows Phone Development QuickStartsMobile Platform Development
  34. 34. Windows Phone 8 即將到來偷看Windows Phone 8 Emulator的內容
  35. 35. 功能特性一覽表New platform & APIsMulti-resolutionSpeechTile and NotificationsLock ScreenIn-app purchasingProximity, Bluetooth, Wallet extensibility
  36. 36. IntroductionWP8 – 採用與Win 8相同的Runtime,並增加更豐富支 援手機應用與硬體整合的APIs • Win8:WinRT • WP8:WinPRT – 支援COM、Win32 APIs – 不支援 • Javascript直接存取WinRT APIs
  37. 37. WinRT vs. WinPRT綠色代表相同的,白色代表新增加的部分,只適用於WP8中的WinPRT
  38. 38. Multi-resolution – 1/2WVGA, XVGA, 720p – WP7.1的App需要重新調整Layout佈局 • XVGA, 720p更要小心處理
  39. 39. Multi-resolution – 2/2
  40. 40. Speech互動方式 – Voice Commands • 透過語音指令deep-link應用程式 – 可自訂的指令語言 – Speech Recognition & Text-to-Speech APIs • 透過語音進行輸入,以及讀出用戶輸入的文字 – 利用基於雲計算的語音識別網絡搜索和聽寫,或建立更複雜 的互動
  41. 41. New Tiles – 1/3Flip Tile Template
  42. 42. New Tiles – 2/3Cycle Tile Template – Describes a tile template that cycles between 1 to 9 background images.
  43. 43. New Tiles – 3/3Iconic Tile Template
  44. 44. Lock ScreenLock screen background image – a user can choose to use an app as its lock screen background providerLock screen notification Area – provide content on the lock screen • App icon (24x24 pixel) • App count • App text References: 偷看Windows Phone 8 Emulator的內容
  45. 45. In-app purchasing – 1/3Overview
  46. 46. In-app purchasing – 2/3Develop provide – products that can be sold in your app – clear and accurate product information – the ability to initiate a purchase from within your app, that is, a “buy button” – product delivery and/or enablement, also known as fulfillment
  47. 47. In-app purchasing – 3/3Microsoft provide: – product management tools through App Hub – geo-distributed services – a purchase user experience that is consistent across all apps on the phone – the ability to pay you in 190 countries or regions – proof of purchase authenticity through secure receipts
  48. 48. Proximity & BluetoothProximity – establish a connection between your app and another instance of your app on another, nearby, phone. • NFCBluetooth – enable apps to communicate over Bluetooth. Using this API, an app can connect to another app, or to a device
  49. 49. Wallet extensibilityStore payment instructions, deals, and loyalty cards.Manage the payment instruments that they use in the app and music store.Link items in the wallet to apps on their phone.Make contactless transactions, using near field communication (NFC), in certain markets.
  50. 50. Q&AThanks for your listening

×