Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Windows Phone 8.1 - platform concepts and app development

3,058 views

Published on

In this seminar, app development for Microsoft’s recently announced mobile operating system Windows Phone 8.1 was introduced. The general architecture and many platform concepts are highlighted in these slides.

The full paper can be read here: https://www.academia.edu/7712500/Windows_Phone_8.1_-_platform_concepts_and_app_development

Published in: Technology

Windows Phone 8.1 - platform concepts and app development

  1. 1. Dresden, July 16th, 2014 Windows Phone 8.1 platform concepts and app development Advanced seminar by Sebastian Müller
  2. 2. Windows Phone 8.1 – platform concepts and app development #2July 16th, 2014 ... Windows Mobile 6.5 Windows Phone 7 Windows Phone 8 Windows Phone 8.1 Windows CE Windows NT History of Microsoft‘s mobile operating systems
  3. 3. Windows Phone 8.1 – platform concepts and app development #3July 16th, 2014
  4. 4. Windows Phone 8.1 – platform concepts and app development #4July 16th, 2014 Hardware requirements • Snapdragon CPU • 512MB, 1GB or 2GB RAM • 1080p, 720p, WXGA, qHD, FWVGA, WVGA resolution • multi-touch display • rear-facing camera (VGA) • mobile data, WiFi, Bluetooth 4, A-GPS • accelerometer, proximity, ambient light sensors • mechanical power, vol+, vol- buttons
  5. 5. Windows Phone 8.1 – platform concepts and app development #5July 16th, 2014 Apps
  6. 6. Windows Phone 8.1 – platform concepts and app development #6July 16th, 2014 App models WP7 Silverlight WP8 Silverlight WP 8.1 Silverlight WP 8.1 WinRT Silverlight Windows Phone 8 API Windows Phone 8.1 API WinRT WP 7 API WP 8.1 WinJS WinJS
  7. 7. Windows Phone 8.1 – platform concepts and app development #7July 16th, 2014 App models WP7 Silverlight WP8 Silverlight WP 8.1 Silverlight WP 8.1 WinRT Silverlight Windows Phone 8 API Windows Phone 8.1 API WinRT WP 7 API WP 8.1 WinJS WinJS
  8. 8. Windows Phone 8.1 – platform concepts and app development #8July 16th, 2014 App models WP7 Silverlight WP8 Silverlight WP 8.1 Silverlight WP 8.1 WinRT Silverlight Windows Phone 8 API Windows Phone 8.1 API WinRT WP 7 API WP 8.1 WinJS WinJS
  9. 9. Windows Phone 8.1 – platform concepts and app development #9July 16th, 2014 Windows programming model http://channel9.msdn.com/Events/Build/2014/2-507
  10. 10. Windows Phone 8.1 – platform concepts and app development #10July 16th, 2014 • relatively low-level ABI • WinRT components act as libraries • written in C#, C++/CX • metadata describes underlying API to managed languages Windows Runtime
  11. 11. Windows Phone 8.1 – platform concepts and app development #11July 16th, 2014 Windows Runtime ChakraCLR Windows Runtime Object C++ App HTML App C#/VB App ProjectionProjectionProjection Metadata (winmd)
  12. 12. Windows Phone 8.1 – platform concepts and app development #12July 16th, 2014 Windows Runtime projection WinRT Type/Interface .NET Equivalent Boolean Boolean DateTime DateTimeOffset Int64 Long String String IMap<K,V> IDictionary<K,V> IVector<T> IList<T>
  13. 13. Windows Phone 8.1 – platform concepts and app development #13July 16th, 2014 Windows Runtime projection WinRT pattern VB/C# pattern JavaScript pattern AsyncOperation awaitable Task Promise Event Event, += Event, addEventListener Delegate Delegate function() … Collections System.Collections. Generic Array, hash
  14. 14. Windows Phone 8.1 – platform concepts and app development #14July 16th, 2014 Windows Runtime ChakraCLR Windows Runtime Object C++ App HTML App C#/VB App ProjectionProjectionProjection Metadata (winmd)
  15. 15. Windows Phone 8.1 – platform concepts and app development #15July 16th, 2014 Hello World!
  16. 16. Windows Phone 8.1 – platform concepts and app development #16July 16th, 2014 Development tools
  17. 17. Windows Phone 8.1 – platform concepts and app development #17July 16th, 2014 Hello world example
  18. 18. Windows Phone 8.1 – platform concepts and app development #18July 16th, 2014 App.xaml <Application x:Class="HelloWorldApp.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Application.Resources> <SolidColorBrush x:Name="HelloWorldColorBrush" Color="Red" /> </Application.Resources> </Application>
  19. 19. Windows Phone 8.1 – platform concepts and app development #19July 16th, 2014 App.xaml.cs public sealed partial class App : Application { public App() { InitializeComponent(); Suspending += OnSuspending; } protected override void OnLaunched(LaunchActivatedEventArgs e) { var rootFrame = Window.Current.Content as Frame; //... rootFrame.Navigate(typeof(MainPage), e.Arguments); //... Window.Current.Activate(); } private void FirstNavigated(object sender, NavigationEventArgs e) { //... } private void OnSuspending(object sender, SuspendingEventArgs e) { //... } }
  20. 20. Windows Phone 8.1 – platform concepts and app development #20July 16th, 2014 Hello Windows Phone!
  21. 21. Windows Phone 8.1 – platform concepts and app development #21July 16th, 2014 MainPage.xaml <Page x:Class="HelloWorldApp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Page.BottomAppBar <CommandBar> <AppBarButton Label="Hello" Click="BtnClicked" Icon="World"/> </CommandBar> </Page.BottomAppBar> <Grid VerticalAlignment="Center" HorizontalAlignment="Center"> <TextBlock x:Uid="HelloWorldTxt" x:Name="TextBlock1" Style="{ThemeResource GroupHeaderTextBlockStyle}" Foreground="{ThemeResource PhoneAccentBrush}" Text="Hello world!" /> </Grid> </Page>
  22. 22. Windows Phone 8.1 – platform concepts and app development #22July 16th, 2014 MainPage.xaml.cs public sealed partial class MainPage : Page { public MainPage() { InitializeComponent(); NavigationCacheMode = NavigationCacheMode.Required; } protected override void OnNavigatedTo(NavigationEventArgs e) { //... } private void BtnClicked(object sender, RoutedEventArgs e) { //... } }
  23. 23. Windows Phone 8.1 – platform concepts and app development #23July 16th, 2014 Hello Windows Phone!
  24. 24. Windows Phone 8.1 – platform concepts and app development #24July 16th, 2014 An app‘s lifecycle http://msdn.microsoft.com/en-us/library/windows/apps/hh464925.aspx
  25. 25. Windows Phone 8.1 – platform concepts and app development #25July 16th, 2014 Communication / Contracts • file associations • URI contracts • share • file save picker • file open picker
  26. 26. Windows Phone 8.1 – platform concepts and app development #26July 16th, 2014 Secondary and Live Tiles http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202948(v=vs.105).aspx
  27. 27. Windows Phone 8.1 – platform concepts and app development #27July 16th, 2014 Secondary Tiles http://channel9.msdn.com/Events/Build/2014/2-537
  28. 28. Windows Phone 8.1 – platform concepts and app development #28July 16th, 2014 Live Tiles http://msdn.microsoft.com/en-us/library/windows/apps/dn632423.aspx
  29. 29. Windows Phone 8.1 – platform concepts and app development #29July 16th, 2014 Background tasks Trigger Usage System Trigger UserPresent, UserAway, SessionConnected, TimeZoneChange, NetworkStateChange, InternetAvailable, ServicingComplete, GattCharacteristicNotificationTrigger, DeviceChangeTrigger, DeviceUpdateTrigger, RfcommConnectionTrigger Run code on system events TimeTrigger Data synchronization MaintenanceTrigger Perform maintenance work on AC power http://channel9.msdn.com/Events/Build/2014/2-518
  30. 30. Windows Phone 8.1 – platform concepts and app development #30July 16th, 2014 Battery Saver http://channel9.msdn.com/Events/Build/2014/2-518
  31. 31. Windows Phone 8.1 – platform concepts and app development #31July 16th, 2014 Action Center • add/edit/remove (ghost) notifications • in-app, triggered, scheduled, push
  32. 32. Windows Phone 8.1 – platform concepts and app development #32July 16th, 2014 • Local • isolated • app-specific • LocalCache • not included in backups • Roaming • cloud synced • size limit • Temporary • transient • PasswordFault • sensitive information • Project • install folder Storage and Settings
  33. 33. Windows Phone 8.1 – platform concepts and app development #33July 16th, 2014 XAML: Images/logo.png E.g. loads: Images/en-US/homeregion-USA/logo.scale- 140_contrast-white.png Standard naming convention: foldername/qualifiername-value/qualifiername- value/filename.qualifiername-value_qualifier name- value.ext Resources and localization
  34. 34. Windows Phone 8.1 – platform concepts and app development #34July 16th, 2014 Key Value HelloWorldTxt.Text Hello Windows Phone HelloWorldTxt.Background Blue HelloWorldTxt.TextAlignment Right HelloWorldTxt.FlowDirection RightToLeft Resources and localization <TextBlock x:Uid="HelloWorldTxt" Style="{ThemeResource GroupHeaderTextBlockStyle}" Foreground="{ThemeResource PhoneAccentBrush}" Text="Hello world!" />
  35. 35. Windows Phone 8.1 – platform concepts and app development #35July 16th, 2014 App package ZIP container Files / Assets AppXManifest.xml BlockMap Signature • local: appx or appxbundle • cloud:  machine code for each device  security signature
  36. 36. Windows Phone 8.1 – platform concepts and app development #36July 16th, 2014 Voice commands <?xml version="1.0" encoding="utf-8"?> <VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.1"> <CommandSet xml:lang="en-us" Name="englishCommands"> <CommandPrefix> MSDN </CommandPrefix> <Example> find 'Windows Phone Voice Commands' </Example> <Command Name="MSDNSearch"> <Example> find 'how to install CommandSets' </Example> <ListenFor> Search </ListenFor> <ListenFor> Search [for] {dictatedSearchTerms} </ListenFor> <ListenFor> Find {dictatedSearchTerms} </ListenFor> <ListenFor> Find </ListenFor> <Feedback> Searching MSDN... </Feedback> <Navigate Target="MainPage.xaml" /> </Command> <PhraseTopic Label="dictatedSearchTerms" Scenario="Search"> <Subject> MSDN </Subject> </PhraseTopic> </CommandSet> </VoiceCommands>
  37. 37. Windows Phone 8.1 – platform concepts and app development #37July 16th, 2014 Metro Design Language
  38. 38. Windows Phone 8.1 – platform concepts and app development #38July 16th, 2014 Metro Design Language
  39. 39. Windows Phone 8.1 – platform concepts and app development #39July 16th, 2014 Thank you Questions

×