Windows Phone Introduction
-
Upload
tung-nguyen-thanh -
Category
Technology
-
view
269 -
download
0
description
Transcript of Windows Phone Introduction
Windows Phone 8 Programming Introduction
Nguyen Thanh Tung
• CSA at MISA JSC• Mostly working with Microsoft technologies:
• XAML• Silverlight• Entity Framework• ASP.NET• Windows Phone• Windows 8 and more
• http://tungnt.net• https://www.facebook.com/tungnt185
Agenda
• Windows Phone 8 (WP8) introduction
– The most interesting features
– Marketshare
• WP8 application lifecycle, software architecture & deployment process
• Developing tools
– Microsoft Visual Studio 2013 & Expression Blend
– VS2013 project template
– Third party control for designing user interface (UI)
• C# basics
History of Microsoft Mobile OS
Windows CE OS (2000)
Windows Mobile (2003 – 2009)
Windows Phone 7 (11/2010)
Windows Phone 7.5 Mango (5/2011)
Windows Phone 8 & 7.8
(10/2012)
Windows Phone 8.1 (8/2014)
Windows® Phone 8
A different kind of phone designed to bring together what you care about most – easier and faster
Smart designGlance and go experienceDesigned to do more in less steps
Windows Phone HubsOrganized to get everything you love easier and faster
Optimized EcosystemRich platform and tools on optimized hardware
Smart Design
• Metro Styles
• App Bar
Hubs
• People
• Office
• Pictures
• Music & Video
• Marketplace
• Games
• Wallet
Top 3 Smartphone OS
Windows Phone Market Share
VietNam Smartphone Market Share
Windows Phone Store
More than 300.000 app
Monetizing With Windows Phone App
• Paid App:
– 0.99$, 499$...
• Free App with Advertising:
– PubCenter, AdMod
– VServ, MobFox …
• In-App Purchases:
– New Add-ons, New Items, New
level…
One App Model, three technology choices*
– XAML with C#/VB
– Native C/C++
– HTML5 browser control
*Not exclusive, can mix and match
Three Flavors of Applications
Windows Phone 8 app models
Direct3D AppC++
XAML AppC# / VB
Windows Phone 8 API Set
Graphics Audio Media
File System Networking Input
Commerce Base Types Sensors
Common.NET FX
CoreCLR
Direct3DInterop
C++Reuse
Deployment Process
Develop & Debug
Submit& Validate
Certify & Sign
Windows Phone Application Deployment Service
Marketplace
• Store deployment
Deployment Process
• Company enrollment
Tool for developing WP8 application• Features:
– Develop three types application:
• XAML with C#/VB
• Native C/C++
• HTML5 browser control
– Windows Phone 8 Emulator for testing apps
– Power debugging capabilities of Visual Studio family
– Designer support good enough to create the UI
Microsoft Expression Blend for WP
Expression Blend is used to design beautiful User Interface:
– You can build amazing experiences relatively easy
– Has a learning curve, especially for developers
• The tool is powerful but use it ‘wisely’ for Windows Phone UI design
• The tool of choice for transitions / animations
• Has great support for showing / testing data driven UI elements
– Can be used in combination with Visual Studio 2013
• Uses the same Windows Phone Emulator to test experiences
Microsoft Expression Blend for WP
Visual Studio’s project template• New and Updated
Project Templates
– HTML5, Localization Support, Alignment Grid
– Direct3D support with Native C++
Visual Studio’s project template
Template DescriptionWindows Phone Application Creates a project that can be used as a starting point
for any Silverlight for Windows Phone application. Windows Phone Databound Application Creates a project that uses the ListBox control and
navigation features. In addition, this template creates an application using the Model-View-ViewModel design pattern.
Windows Phone Class Library Creates a class library project that compiles as an assembly by default. This template has no UI elements and can be shared with other applications.
Windows Phone Panorama Application Creates a project that uses a Panorama control that allows you to view controls, data, and services by using a long horizontal canvas that extends beyond the confines of the screen.
Windows Phone Pivot Application Creates a project that uses a Pivot control to enable the you to switch between views or pages within the application.
• Windows Phone project template
Visual Studio’s project templateTemplate Description
Windows Phone XAML and Direct3D App
Creating a Windows Phone managed application with native components.
Windows Phone Silverlight and XNA Application
Creates a project that enables the rendering of Silverlight and XNA Framework content in the same application.
Windows Phone HTML5 AppCreating a Windows Phone application that uses primarily HTML content.
Windows Phone Audio Playback Agent Creates a class library project for adding a background agent to play audio files.
Windows Phone Audio Streaming Agent Creates a class library project for adding a background agent to play streaming audio files.
Windows Phone Scheduled Task Agent Creates a class library project for adding a background agent to perform a periodic or resource-intensive task. Three types of project above compiles as an assembly by default and can be referenced by Silverlight or XNA Framework application projects.
Visual Studio’s project template
Template Description
Windows Phone Direct3D with XAML App A project for creating a Windows Phone application that uses Direct3D and XAML.
Windows Phone Direct3D App (Native Only) A project for creating a Windows Phone app that uses Direct3D.
Windows Phone Runtime Component A project for creating a Windows Phone Runtime component for a Windows Phone app.
Windows Phone Empty Dynamic Link Library A project for creating a native dynamic-link library for a Windows Phone app.
Windows Phone Empty Static Library A project for creating a native static library for a Windows Phone app
• C++ project template
WP8 the most interesting featuresNew Hardware
• Multi-Core Chipsets
– Dual-Core & more…
e.g. Qualcomm Snapdragon S4
WP8 the most interesting features3 Screen Resolutions
WVGA800x480 (15:9)
WXGA1280x768 (15:9)
720p1280x720 (16:9)
*New graphics hardware means that existing apps auto-scale and look amazing on all screens.
WP8 the most interesting featuresMicroSD Supporte.g. Photos, Music, Videos, Installing Apps
WP8 the most interesting featuresInternet Explorer 10• Same rendering engine as Windows 8 PCs
• SmartScreen anti-phising filter
• 4x faster JavaScript performance compared toWindows Phone 7.5
• 2x HTML5 feature support compared to Windows 7.5 (e.g. touch support)
WP8 the most interesting featuresNative Code
• Common platform for Windows
Phone 8 and Windows 8
• Native game development platform
based on DirectX, C / C++
• Games developers can write the
same game for Windows 8 and
Windows Phone
WP8 the most interesting features• Better Sharing with NFC
Tap-to-share, etc…
• Magazine Ads
• Business Cards
• NFC enabled phones
• Windows Surface
• Matchmaking (e.g. gaming over p2p network)
• Most Complete Wallet Experience
– Credit & Debit Cards
– Loyalty & Membership Cards
– Access Saved Deals
– Supports NFC ‘Tap to Pay’
– In-App-Purchases
* Secure SIM-based solution in partnership with mobile operators, will see these next year in US, but not at time of launch.
WP8 the most interesting features
• Nokia Map Technology
– Great global NAVTEQ
Map data
– Offline map support
– Map control for
developers
– Turn-by-Turn Directions
WP8 the most interesting features
• For Business
– Sign and deploy apps without going through marketplace
– Company Hub
WP8 the most interesting featuresNew Start Screen
Panorama control• Part of the native Windows Phone look and feel
• Panorama is a long horizontal canvas
• PanoramaItem serves as a container that hosts other content and controls
Pivot control
• 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
Location and Services• The service obtains
location data from multiple sources such as A-GPS, Wi-Fi, and cellular
• Allows you to create location-aware applications
• Allow location-tracking application to run in the background Location
Services
+ Accuracy- Power- Speed- Indoors
- Accuracy+ Power+ Speed- Wilderness
+/- Accuracy+/- Power+/- Speed+/- Urban areas
GPS
Cell Towers
WiFi
Push Notifications
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
Accelerometer, Compass, Gyroscope
• Motion APIs
– Accelerometer determine direction the user is moving the device
– Compass determine the relative angle of rotated device
– Gyroscope determine rotational velocity of device
+Y
-Y
+X-X
+Z
-Z
Demo Project Template
WP8 Application Lifecycle
Obscured: popup ui from shell
Running
Obscured
Running
Unobscured
Games could auto-pause
Game could auto-resume
• Phone call
• Reminder
• Battery low
Paused: jump to another app
Running
Pause
Suspended
Resume
Assume your process is killed
Save state for later use
Load state to continue where you left off
User never knows what happened :-)
• Start Button
• Accept call• Open toast
Demo Application Lifecycle
Application manifest
• File: WMAppManifest.xml
– Contains properties and settings that are required when you submit your app to the Windows Phone Store
– Ex: Describe your app to OS by Product title …
Building the first WP8 applicationItem Description
App.xaml / App.xaml.cs Defines the entry point of the application, initializes application-scoped resources, and displays the application user interface
MainPage.xaml / MainPage.xaml.cs Defines a page with the user interface of the application
ApplicationIcon.png An image file with an icon that represents the application icon in the phone’s application list
Background.png An image file with an icon that represents the application icon in the start screen
SplashScreenImage.jpg This is the image that will first be displayed when the application launches.
Properties\AppManifest.xml An application manifest file required to generate the application package
Properties\AssemblyInfo.cs Contains the name and version metadata that is embedded into the generated assembly
Properties\WMAppManifest.xml A manifest file that includes specific metadata related to a Windows Phone Silverlight application
References folder A list of libraries (assemblies) that provide services and functionality that the application requires to work
Remember things
• XAML (eXtensible Application Markup Language)
• ApplicationLifetimeObject
– PhoneApplicationService
• RootFrame
– PhoneApplicationFrame
• PhoneApplicationPage
3rd control for designing application UI
Summary
• Windows Phone 8 (WP8) introduction
• WP8 software architecture & deployment process
• Tool for developing WP8 application
– Microsoft Visual Studio 2012
– Microsoft Expression Blend
• Project template for creating WP8 application
• WP8 application lifecycle
• Third party control for designing application user interface