1 / 72

Windows Phone 7 - wstęp

Windows Phone 7 - wstęp. Andrzej Chybicki. Windows Phone 7 - początki. Microsoft o Windows Phone 7: In golf, it’s known as a “mulligan”; in schoolyard sports, it’s called a “do-over”; and in the computer industry, we say it’s a “reboot.” Dwie ścieżki programowania : - XNA

Télécharger la présentation

Windows Phone 7 - wstęp

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows Phone 7 - wstęp Andrzej Chybicki

  2. Windows Phone 7 - początki Microsoft o Windows Phone 7: In golf, it’s known as a “mulligan”; in schoolyard sports, it’s called a “do-over”; and in the computer industry, we say it’s a “reboot.” Dwie ścieżki programowania :- XNA -Silverlight Silverlight – platforma developerska łącząca wygodę tworzenia interfejsu, automatycznym łączeniem zdarzeń z możliwością zaawansowanego przetwarzaniem danych XNA – platforma developerska do tworzenia gier (2D i 3D), -game-loop -XBOX, PC, Zune (mobile)

  3. Środowisko pracy aplikacji • Kod w pełni zarządzalny przez .NET Framework • Języki programowania • Sugerowane rozwiązanie – C# • XNA i Silverlight współdzieli niektóre biblioteki, ale nie można tworzyć projektów „mieszanych”

  4. Silverlightvs. XNA • Dla aplikacji użytecznych (RIA) • XAML (ExtensibleApplicationMarkupLanguage) • Interfejs użytkownika • Przekazywanie zdarzeń • Niektóre elementy logiczne oraz animacyjne • WP7 Silverlight = Silverlight 3 – niektóre rzeczy, których nie można zrobić na telefonie + niektóre rzeczy które można zrobić tylko na telefonie 

  5. XNA vs. Silverlight • Gry, aplikacje medialne, animacje z interakcją z użytkownikiem wymagające zaawansowanego renderowania grafiki • Wewnętrzna synchronizacja wątków odświeżania i użytkownika • 2D (sprites) i 3D (models) • Silverlight (vectorgraphics) vs. XNA (bitmap graphics) • Time-steeredvs. user(event) steeredapps

  6. Two Flavors of Applications • Modern XAML/event-driven application UI framework • Rapid creation of visually stunning apps • Metro-themed UI controls • HTML/JavaScript • 500,000 developers spanning Windows and web • High performance game framework • Rapid creation of multi-screen 2D and 3D games • Rich content pipeline • Mature, robust, widely adopted technology spanning Xbox 360, Windows, and Zune

  7. Windows Phone 7 jest w chmurze! • Mapy Bing (LBS) • Xbox Live • Windows PhoneMarketplace

  8. Cloud and Integration Services General Concept App Model UI Model Software Architecture Hardware Foundation

  9. New Concept DESIGN: END USER COMES FIRST PLATFORM: RICHER, DEEPER, EASIER APPS HARDWARE: FASTER TO MARKET, LESS HEAVY LIFTING

  10. Metro UI

  11. Hardware Foundation (in 7.0) Capacitive touch 4 or more contact points 800 Sensors A-GPS, Accelerometer, Compass, Light, Proximity, Camera 5 mega pixels or more Multimedia Common detailed specs, Codec acceleration Memory 256MB RAM or more, 8GB Flash or more GPU DirectX 9 acceleration CPU Qualcomm MSM8x55 800Mhz or higher Hardware buttons | Back, Start, Search 480

  12. Sprzęt, wymagania i usługi • Wielodotykowy ekran OLED (“organic light emitting diode”) • Przyciski: • Rozmiar ekranu: 480 x 800 (480 x 320) (160 px) • Modem 3G, Wi-fi, Camera, Akcelerometr • Vibration • FM Radio • PushNotification

  13. Windows Phone Developer Tools Tools Phone Emulator Windows Phone Emulator Samples Documentation Packaging & Verification Tools Guides Community Windows Phone device Packaging and Verification Tools myapp.xap

  14. Deployment Process Develop & Debug Submit& Validate Certify & Sign Windows Phone Application Deployment Service Marketplace

  15. Certyfikacja aplikacji – główne filary • Applications are reliable. • Applications make efficient use of resources. • Applications do not interfere with the phone functionality. • Applications are free of malicious software.

  16. Obszary procesu certyfikacji • Application Policies • Content Policies • Application Submission Requirements • Technical Certification Requirements • Additional Requirements for Specific Application Types • Patrz materiały do wykładu

  17. ApplicationPolicies – Aplikacja… • …musi być w pełni funkcjonalna i nie może żądać dodatkowej opłaty za udostępnienie swojej funkcjonalności, chyba że… • … nie może promować planów taryfowych połączeń • … nie może stanowić zagrożenia dla bezpieczeństwa telefonu oraz Marketplace • … jeśli aplikacja pobiera lub zajmuje ponad 50 MB danych musi poinformować o tym użytkownika • … jeśli wymaga uwierzytelniania w komunikacji peer2peer należy się upewnić że użytkownik ma ponad 13 lat

  18. ApplicationPolicies (2)– Aplikacja… • … może określać pozycję tylko na podstawie API • ... może udostępniać lokalizację tylko za zgodą użytkownika • … musi spełniać jeszcze inne wymagania : • patrz materiały do wykładu

  19. ContentPolicies • Logo i znaki towarowe • aplikacja może (powinna) posiadać swoje logo • Może korzystać z innych znaków towarowych pod warunkiem akceptacji właściciela • Nie może zawierać treści niezgodnych z prawem, w szczególności • Promowanie przemocy, rasizmu, alkoholu, broni palnej i innych • Treści, które ogólnie nie są obraźliwe ale mogą być uznane za takie w niektórych krajach ->treść powinna uwzględniać aspekt prawny każdego kraju w jakim MarketPlace oferuje swoje aplikacje

  20. ApplicationSubmissionRequirement • Maksymalny rozmiar pliku XAP – 225 MB • Używanie tylko API Windows Phone • Zabronione jest korzystanie z metod wywołania typu Pinvoke oraz obiektów COM • Nie może zawierać konfiguracji DEBUG • Nie jest możliwe łączenie technologii XNA i Silverlight • Microsoft.Xna.Framework.Game • System.Windows.Controls • PhoneCapabilites czyli prawidłowy Manifest

  21. TechnicalCertificationRequirements • Kompatybilność z różnymi telefonami WP 7 (2) • Unexpectedclosure • Responsywność aplikacji • Operacji trwające dłużej niż 3 sekundy muszą być obsługiwane przez ProgressBar lub BusyIndicator • W momencie przekazania aplikacji do MarketPlace wszystkie zdalne serwisy i zasoby aplikacji muszą być dostępne i wpływają na proces certyfikacji! • Czas startu i responsywności po starcie – 5 s. i 20 s.

  22. TechnicalCertification (2) • Elementy obsługi przycisków telefonu…. • Zajętość pamięci • Max 90 MB RAM, dla urządzeń do 256 MB RAMU całkowitego • Zaleca się użycie obiektów • DeviceExtendedProperties • DeviceStatus • Aplikacja nie może blokować , opóźniać, przerywać odbioru połączeń telefonicznych, wiadomości SMS oraz innych zdarzeń wywoływanych z poziomu OS

  23. AdditionalRequirements • Lokalizacja • Jeśli użytkownik nie życzy sobie … • Aplikacje działające w tle a oszczędność baterii • Aplikacje działające w tle do pobierania danych • Muszą umożliwiać podgląd stanu zaawansowania pobierania oraz anulowania

  24. Cloud and Integration Services Software Architecture App Model UI Model Software Architecture Hardware Foundation

  25. Silverlight Capabilities • Inputs • Keyboard, Mouse, Touch, Ink • XAML UI Core • Common Controls, Text, Images, Data Binding, Page Navigation, Vector Graphics, Animation, Transformation, Styles and Templates • Media • Capture and Playback, VC1, WMA, MP3 • Data • LINQ to Objects, LINQ to XML, Isolated Storage, XML • Base Class Library • Generics, Collections, Cryptography, Threading • Communication • REST, RSS/ATOM, SOAP

  26. Multitouch • OOB Controls support touch • Translate touch events to mouse events • ScrollViewer has built-in support for pan and flick • Manipulation for all UIElements • Scale • Translate

  27. Keyboard • Silverlight TextBox integrates with the SIP (on screen keyboard) • Password has a delay • SIP supports input scoping • Key InputScopes: Text, Url, Number, Time, TelephoneNumber, EmailNameOrAddress

  28. Media • Media support • H/W decode • MediaStreamSource • PlayReady DRM • MediaElement Limitations • One MediaElement only • XNA sound effect API • Supports polyphonic, looping wav data

  29. Isolated Storage • Compatible APIs with Silverlight on desktop • No quota limits • Not shared • No write access to Media Library, use XNA for that • Use for your application settings

  30. Cloud and Integration Services ApplicationModel App Model UI Model Software Architecture Hardware Foundation

  31. Activation and Navigation • Activation Events • Handled by the Application instance • Launching, Activated, Deactivated and Closing • Navigation Events • Handled by each PhoneApplicationPage class • OnNavigatedTo, OnNavigatedFrom, OnBackKeyPressed, OnChooserReturn, OnOrientationChanged • Controlled by • Hardware using Back and Home keys • Software using Navigation Service

  32. Application Lifecycle Save State! Load State! • Phone removed from memory • Some state saved to storage

  33. Application Bar and System Tray • System Tray • No integration, but does affect Layout • Show:Hide using SystemTray.IsVisible • Application Bar • Up to 4 Buttons • Menu Items (Recommended 6) • Toggle Visibility • <mypage>.ApplicationBar.IsVisible

  34. Panorama • Part of the native Windows Phone look and feel • Panorama is a long horizontal canvas • PanoramaItemserves as a container that hosts other content and controls

  35. Pivot • Provides a quick way to manage views or pages • Pivot is a container of pivot items • PivotItem contain individual page content such as controls, grids, or links

  36. Many more… • Standard Controls • Buttons, Image, Layout, ListBox, TextBox, Slider, Other… • Bing Maps • Bing Map Control, Integration with Bing Maps Services • Deep Zoom • Included in core run-time , Optimized to take advantage of GPU, Consumes same content as SL on desktop, Supported for Online content • Web Browser • Displays network and local content, Supports pan, double tap and pinch to zoom, Supports transforms & projections, Application can interact with javascript

  37. Cloud and Integration Services IntegrationServices App Model UI Model Software Architecture Hardware Foundation

  38. Launchers & Choosers • Enable applications to provide a set of common phone tasks to their users • Launchers let you fire and forget • SMS, Email, Web Browser, Dialer, Search, etc. • Choosers let you fire and pick the results back • Picture, Camera, Contact, etc.

  39. Push Notifications

  40. Types of Push Notifications • Tile notifications • Update tile count, title and background image • Toast notifications • Display a on-top-like message • Raw notifications • Can be used in application logic

  41. Location and Services • The service obtains location data from multiple sources such as GPS, Wi-Fi, and cellular • Applications can access location information • Allows you to create location-aware applications

  42. Register Your Device Test on a physical device Register your device Install, run, and debug unsigned applications Use Zune to register your device

  43. Programowanie • Windows 7!! • Visual Studio 2010 • Zune software (zamiast ActiveSync) • Oczywiście będą problemy z deployowaniem aplikacji na Windows Mobile (dlaczego ma być zbyt prosto?) • Co trzeba zrobić aby zsynchronizować kalendarz Windows XP z Windows Phone 7? UŻYĆ GOOGLA!!

  44. Pierwsza aplikacja Silverlight • Windows PhoneApplication • WMAppManifest.xml • Title="SilverlightHelloPhone„ • Deployowanie na emulator albo prosto do urządzenia • Rozdzielczość ekranu emulatora jest taka sama jak w urządzeniu • Możliwość zmiany orientacji emulatora

  45. Układ plików projektu Silverlight • Cztery główne pliki każdego projektu: • App.xaml • MainPage.xaml • App.xaml.cs • MainPage.xaml.cs • Postulat „code-behind”

  46. App.xaml.cs, App.xaml oraz App.g.cs

  47. MainPage.cs.xaml - > MainPage.g.cs • Element w Silverlight i XML • Hierarchia obiektów:

  48. /bin/Debug • Plik XAP – spakowany, przekompilowany projekt

  49. A teraz „HelloWorld” w XNA • Brak wbudowanych czcionek • Czcionka jest bitmapą! Wszystko jest bitmapą! • Czcionka musi być osobno zaimportowana do projektu (problemy licencyjne)

  50. Game.cs – główna część projektu w XNA

More Related