SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
LUMIA APP LABS #17

OPTIMISING YOUR APPS
FOR LARGE-SCREEN
PHONES
Lucian Tomuta
Chief Engineer
Twitter: @ltomuta
AGENDA
What’s new?
New features in Windows Phone Update 3
New Nokia Lumia smartphones
Scalable applications supporting 1080p
Layouts optimized for large displays?
Questions...

© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
WHAT’S NEW …
Windows Phone Update 3 (aka GDR3)
Support for more powerful hardware
1080p resolution support
Layout optimization for large-screen displays
Changes in application memory limits
Change in IE’s viewport reported size
… more consumer focused features.
Windows Phone Preview for Developers
© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
WHAT’S NEW ...
Nokia Lumia 1520
Gorgeous 6’’ display @ 1080p
Qualcomm Snapdragon 800 2.2 GHz
Adreno 330
2 GB RAM
Nokia Lumia 1320
Gorgeous 6’’ display @ 720p
Snapdragon S4 1.7 GHz
Adreno 330
512 MB RAM

© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
ALL NEW... 1080P
Scale factor:
1.5 (real scale
factor is 2.25)

© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
YOUR EXISTING APP
...will work on 1080p without any* changes.
If your application is already declaring 720p layout support – it will install and run scaled-up on
the 1080p device
If your application does not declare 720p layout support – it will not install on the 1080p
device and not be offered by the Windows Phone Store
If your application is a WP7.x application (not updated to WP8) it will be made available to
1080p devices, but will run letterboxed
© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
OPTIMIZE FOR LARGE HD DISPLAYS
How can I make my app look better?
Detect device’s resolution
Design an auto-scaling layout
Optimize your graphic assets
Optimize your video assets
Optimize your fonts

© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
RESOLUTION DETECTION
public enum Resolutions { WVGA, WXGA, HD720p, HD1080p };
public static class ResolutionHelper
{
static private Size _size;
private static bool IsWvga
{
get
{
return App.Current.Host.Content.ScaleFactor == 100;
}
}
private static bool IsWxga
{
get
{
return App.Current.Host.Content.ScaleFactor == 160;
}
}
private static bool Is720p
{
get
{
return (App.Current.Host.Content.ScaleFactor == 150 && !Is1080p);
}
}

private static bool Is1080p
{
get
{
if(_size.Width == 0)
{
try
{
_size = (Size)DeviceExtendedProperties.GetValue("PhysicalScreenResolution");
}
catch (Exception)
{
_size.Width = 0;
}
}
return _size.Width == 1080;
}
}
public static Resolutions CurrentResolution
{
get
{
if (IsWvga) return Resolutions.WVGA;
else if (IsWxga) return Resolutions.WXGA;
else if (Is720p) return Resolutions.HD720p;
else if (Is1080p) return Resolutions.HD1080p;
else throw new InvalidOperationException("Unknown resolution");
}
}
}

© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
DEVICE EXTENDED PROPERTIES
Three new properties available starting with GDR3
System.ArgumentOutOfRangeException will be thrown if queried on earlier OS
versions.
Property

Value type

Description

PhysicalScreenResolution

Size

Width / height in physical pixels.

RawDpiX

Double

The DPI along the horizontal of the screen. When
the value is not available, it returns 0.0.

RawDpiY

Double

The DPI along the vertical of the screen. When
the value is not available, it returns 0.0.

© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
HIGH RESOLUTION GRAPHICS
For a crisp look on the 1080p device,
provide high resolution graphics
Avoid image distortion by using the
correct aspect ratio.

© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

public class MultiResImageChooserUri
{
public Uri BestResolutionImage
{
get
{
switch (ResolutionHelper.CurrentResolution)
{
case Resolutions.HD1080p:
case Resolutions.HD720p:
//return 16:9 aspect ratio asset, high res
return new Uri("Assets/MyImage.screen-1080p.jpg", UriKind.Relative);
case Resolutions.WXGA:
case Resolutions.WVGA:
// return 15:9 aspect ratio asset, high res
return new Uri("Assets/MyImage.screen-wxga.jpg", UriKind.Relative);
default:
throw new InvalidOperationException("Unknown resolution type");
}
}
}
}

11/6/2013

Nokia Internal Use Only
HIGH RESOLUTION GRAPHICS
Make sure to load the files at needed resolution to reduce memory footprint
...
var bmp = new BitmapImage();
// no matter the actual size, this bitmap is decoded to 480 pixels width
// aspect ratio preserved and only takes up the memory needed for this size
bmp.DecodePixelWidth = 480;
bmp.UriSource = new Uri(@"AssetsDemo1080p.png", UriKind.Relative);
ImageControl.Source = bmp;
...

Optimize asset downloads to minimize data traffic

© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
ASSETS WITH PREDEFINED SIZES
Tiles
Smaller on large screen displays due to the 3 columns
layout.
Use WXGA tile sizes and rely on the platform scaling
them down.

Splash Screen
Provide resolution specific assets.
SplashScreenImage.Screen-720p.jpg will be loaded
correctly while SplashScreenImage.jpg is letterboxed
© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
FULL HD VIDEO
Full HD video supported, progressive or adaptive
We recommend Smooth Streaming technology, allowing the Player Framework
to optimized video download based on device’s capabilities and network
bandwidth restrictions.
Player Framework v1.3 now supports 1080p, get it from
http://playerframework.codeplex.com/
© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
TYPOGRAPHY
Predefined text styles are already
optimized for your device.
If using custom text styles, please
make sure to review their sizes.
Scale by 2.25 your title styles
For body texts, scale by 1.8 (80%)
© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
LAYOUT OPTIMISATION
It all depends on your app’s function and design.
Millimeter perfect UI?
Real scale factor is 2.25, not 1.5 as reported by the app.
Large display not optimal for single hand usage
Move controls closer to user’s fingers
More items vs. bigger items
Resize your UI elements to fit more useful content on the screen
May be necessary on 5’’ or larger devices
© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
DETECT SCREEN SIZE
...

class ScreenSizeHelper
{
static private double _screenSize = -1.0f;
static private double _screenDpiX = 0.0f;
static private double _screenDpiY = 0.0f;
static private Size _resolution;
static public bool IsBigScreen
{
get
{
// Use 720p emulator to simulate big screen.
if (Microsoft.Devices.Environment.DeviceType == Microsoft.Devices.DeviceType.Emulator)
{
_screenSize = (App.Current.Host.Content.ScaleFactor == 150) ? 6.0f : 0.0f;
}

If we can read the new device
extended properties,
calculate size.

if (_screenSize == -1.0f)
{
try
{
_screenDpiX = (double)DeviceExtendedProperties.GetValue("RawDpiX");
_screenDpiY = (double)DeviceExtendedProperties.GetValue("RawDpiY");
_resolution = (Size)DeviceExtendedProperties.GetValue("PhysicalScreenResolution");
// Calculate screen diagonal in inches.

If we can’t, OS is pre-GDR3,
screen size is ~= 4’’

_screenSize = Math.Sqrt(Math.Pow(_resolution.Width / _screenDpiX, 2) + Math.Pow(_resolution.Height / _screenDpiY, 2));
}
catch (Exception e)
{
// We're on older software with lower screen size, carry on.
Debug.WriteLine("IsBigScreen error: " + e.Message);
_screenSize = 0;
}
}
// Returns true if screen size is bigger than 5 inches - you may edit the value based on your app's needs.
return (_screenSize > 5.0f);
}
}
}

© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
DYNAMIC LAYOUTS

How to apply dynamic
layouts to an
application?
Demo.

© 2012 Nokia. All rights reserved.
© 2012 Microsoft. All rights reserved.

11/6/2013

Nokia Internal Use Only
A global app development competition
for Nokia Lumia and Windows Phone 8.
It’s your chance to win prizes that will get you noticed,
including trips to MWC, DVLUP XPs, devices, promotions
and much more.
Mini Mission 5: Big Screen.
10 other missions still open.

ENTER NOW > Nokia.ly/create
Nokia Internal Use Only
LUMIA APP LABS #16

THANK YOU!
QUESTIONS?
More information:
Nokia Lumia Developer's Library

http://developer.nokia.com/Resources/Library/Lumia/

Lucian Tomuta
Twitter: @ltomuta

Más contenido relacionado

Más de Microsoft Mobile Developer

Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagMicrosoft Mobile Developer
 
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsLumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsMicrosoft Mobile Developer
 
Windows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appWindows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appMicrosoft Mobile Developer
 
La pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeLa pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeMicrosoft Mobile Developer
 
Il pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoIl pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoMicrosoft Mobile Developer
 
Lens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraLens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraMicrosoft Mobile Developer
 
Nokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phonesNokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phonesMicrosoft Mobile Developer
 
Nokia Asha webinar: Add VoIP services to your Nokia Asha apps
Nokia Asha webinar: Add VoIP services to your Nokia Asha appsNokia Asha webinar: Add VoIP services to your Nokia Asha apps
Nokia Asha webinar: Add VoIP services to your Nokia Asha appsMicrosoft Mobile Developer
 
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0Microsoft Mobile Developer
 

Más de Microsoft Mobile Developer (20)

Lessons learned from Nokia X UI reviews
Lessons learned from Nokia X UI reviewsLessons learned from Nokia X UI reviews
Lessons learned from Nokia X UI reviews
 
Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tag
 
HERE Maps for the Nokia X platform
HERE Maps for the Nokia X platformHERE Maps for the Nokia X platform
HERE Maps for the Nokia X platform
 
Nokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerationsNokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerations
 
Introduction to Nokia Asha SDK 1.2 (beta)
Introduction to Nokia Asha SDK 1.2 (beta)Introduction to Nokia Asha SDK 1.2 (beta)
Introduction to Nokia Asha SDK 1.2 (beta)
 
UX considerations when porting to Nokia X
UX considerations when porting to Nokia XUX considerations when porting to Nokia X
UX considerations when porting to Nokia X
 
Kids' games and educational app design
Kids' games and educational app designKids' games and educational app design
Kids' games and educational app design
 
Nokia X: opportunities for developers
Nokia X: opportunities for developersNokia X: opportunities for developers
Nokia X: opportunities for developers
 
Lumia App Labs: Nokia Imaging SDK 1.1
Lumia App Labs: Nokia Imaging SDK 1.1Lumia App Labs: Nokia Imaging SDK 1.1
Lumia App Labs: Nokia Imaging SDK 1.1
 
Intro to Nokia X software platform and tools
Intro to Nokia X software platform and toolsIntro to Nokia X software platform and tools
Intro to Nokia X software platform and tools
 
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsLumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
 
Windows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appWindows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra app
 
La pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeLa pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo store
 
Il pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoIl pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progetto
 
Lens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraLens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocamera
 
NFC, Bluetooth e comunicazione tra app
NFC, Bluetooth e comunicazione tra appNFC, Bluetooth e comunicazione tra app
NFC, Bluetooth e comunicazione tra app
 
Nokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phonesNokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phones
 
Connettersi al Cloud Azure Mobile Services
Connettersi al Cloud Azure Mobile ServicesConnettersi al Cloud Azure Mobile Services
Connettersi al Cloud Azure Mobile Services
 
Nokia Asha webinar: Add VoIP services to your Nokia Asha apps
Nokia Asha webinar: Add VoIP services to your Nokia Asha appsNokia Asha webinar: Add VoIP services to your Nokia Asha apps
Nokia Asha webinar: Add VoIP services to your Nokia Asha apps
 
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
 

Último

LCAR Unit 20 - Appraising Real Estate - 14th Edition Revised
LCAR Unit 20 - Appraising Real Estate - 14th Edition RevisedLCAR Unit 20 - Appraising Real Estate - 14th Edition Revised
LCAR Unit 20 - Appraising Real Estate - 14th Edition RevisedTom Blefko
 
Goyal Orchid Life East Bangalore.pdf.pdf
Goyal Orchid Life East Bangalore.pdf.pdfGoyal Orchid Life East Bangalore.pdf.pdf
Goyal Orchid Life East Bangalore.pdf.pdfkratirudram
 
Prestige Sanctuary Nandi Hills Bangalore.pdf
Prestige Sanctuary Nandi Hills Bangalore.pdfPrestige Sanctuary Nandi Hills Bangalore.pdf
Prestige Sanctuary Nandi Hills Bangalore.pdfashiyadav24
 
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdf
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdfKohinoor Hinjewadi Phase 2 In Pune - PDF.pdf
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdfmonikasharma630
 
Listing Turkey - Viva Perla Maltepe Catalog
Listing Turkey - Viva Perla Maltepe CatalogListing Turkey - Viva Perla Maltepe Catalog
Listing Turkey - Viva Perla Maltepe CatalogListing Turkey
 
What-are-the-latest-modular-wardrobe-designs.pdf
What-are-the-latest-modular-wardrobe-designs.pdfWhat-are-the-latest-modular-wardrobe-designs.pdf
What-are-the-latest-modular-wardrobe-designs.pdfKams Designer Zone
 
LCAR Unit 19 - Financing the Real Estate Transaction - 14th Edition Revised
LCAR Unit 19 - Financing the Real Estate Transaction - 14th Edition RevisedLCAR Unit 19 - Financing the Real Estate Transaction - 14th Edition Revised
LCAR Unit 19 - Financing the Real Estate Transaction - 14th Edition RevisedTom Blefko
 
Prestige Orchards Plots in Shamshabad, Mamidipalli, Hyderabad pdf.pdf
Prestige Orchards Plots in Shamshabad, Mamidipalli, Hyderabad pdf.pdfPrestige Orchards Plots in Shamshabad, Mamidipalli, Hyderabad pdf.pdf
Prestige Orchards Plots in Shamshabad, Mamidipalli, Hyderabad pdf.pdfAhanundefined
 
Prestige Somerville Whitefield Bangalore E- Brochure.pdf
Prestige Somerville Whitefield Bangalore E- Brochure.pdfPrestige Somerville Whitefield Bangalore E- Brochure.pdf
Prestige Somerville Whitefield Bangalore E- Brochure.pdffaheemali990101
 
What is Affordable Housing? Bristol Civic Society April 2024
What is Affordable Housing? Bristol Civic Society April 2024What is Affordable Housing? Bristol Civic Society April 2024
What is Affordable Housing? Bristol Civic Society April 2024Paul Smith
 
Raymond Ten X Era Viviana Mall Thane Brochure.pdf
Raymond Ten X Era Viviana Mall Thane Brochure.pdfRaymond Ten X Era Viviana Mall Thane Brochure.pdf
Raymond Ten X Era Viviana Mall Thane Brochure.pdfPrachiRudram
 
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...Clemson Engineering Consultant
 
LCAR RE Practice - The Pearson Vue State Exam
LCAR RE Practice - The Pearson Vue State ExamLCAR RE Practice - The Pearson Vue State Exam
LCAR RE Practice - The Pearson Vue State ExamTom Blefko
 
The Role of Mortgage Brokers in Retirement Housing: Key Considerations
The Role of Mortgage Brokers in Retirement Housing: Key ConsiderationsThe Role of Mortgage Brokers in Retirement Housing: Key Considerations
The Role of Mortgage Brokers in Retirement Housing: Key Considerationssunlite Mortgage
 
Provident Solitaire Park Square Kanakapura Road, Bangalore E- Brochure.pdf
Provident Solitaire Park Square Kanakapura Road, Bangalore E- Brochure.pdfProvident Solitaire Park Square Kanakapura Road, Bangalore E- Brochure.pdf
Provident Solitaire Park Square Kanakapura Road, Bangalore E- Brochure.pdffaheemali990101
 
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|AkshayJoshi575980
 
Vilas Javdekar Yashwin Enchante Pune E-Brochure .pdf
Vilas Javdekar Yashwin Enchante Pune  E-Brochure .pdfVilas Javdekar Yashwin Enchante Pune  E-Brochure .pdf
Vilas Javdekar Yashwin Enchante Pune E-Brochure .pdfManishSaxena95
 
Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdf
Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdfKolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdf
Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdfAhanundefined
 
Saheel ITREND Futura At Baner Annexe Pune - PDF.pdf
Saheel ITREND Futura At Baner Annexe Pune - PDF.pdfSaheel ITREND Futura At Baner Annexe Pune - PDF.pdf
Saheel ITREND Futura At Baner Annexe Pune - PDF.pdfmonikasharma630
 
Purva Park Hill Kanakapura Road Bangalore.pdf
Purva Park Hill  Kanakapura Road Bangalore.pdfPurva Park Hill  Kanakapura Road Bangalore.pdf
Purva Park Hill Kanakapura Road Bangalore.pdfashiyadav24
 

Último (20)

LCAR Unit 20 - Appraising Real Estate - 14th Edition Revised
LCAR Unit 20 - Appraising Real Estate - 14th Edition RevisedLCAR Unit 20 - Appraising Real Estate - 14th Edition Revised
LCAR Unit 20 - Appraising Real Estate - 14th Edition Revised
 
Goyal Orchid Life East Bangalore.pdf.pdf
Goyal Orchid Life East Bangalore.pdf.pdfGoyal Orchid Life East Bangalore.pdf.pdf
Goyal Orchid Life East Bangalore.pdf.pdf
 
Prestige Sanctuary Nandi Hills Bangalore.pdf
Prestige Sanctuary Nandi Hills Bangalore.pdfPrestige Sanctuary Nandi Hills Bangalore.pdf
Prestige Sanctuary Nandi Hills Bangalore.pdf
 
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdf
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdfKohinoor Hinjewadi Phase 2 In Pune - PDF.pdf
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdf
 
Listing Turkey - Viva Perla Maltepe Catalog
Listing Turkey - Viva Perla Maltepe CatalogListing Turkey - Viva Perla Maltepe Catalog
Listing Turkey - Viva Perla Maltepe Catalog
 
What-are-the-latest-modular-wardrobe-designs.pdf
What-are-the-latest-modular-wardrobe-designs.pdfWhat-are-the-latest-modular-wardrobe-designs.pdf
What-are-the-latest-modular-wardrobe-designs.pdf
 
LCAR Unit 19 - Financing the Real Estate Transaction - 14th Edition Revised
LCAR Unit 19 - Financing the Real Estate Transaction - 14th Edition RevisedLCAR Unit 19 - Financing the Real Estate Transaction - 14th Edition Revised
LCAR Unit 19 - Financing the Real Estate Transaction - 14th Edition Revised
 
Prestige Orchards Plots in Shamshabad, Mamidipalli, Hyderabad pdf.pdf
Prestige Orchards Plots in Shamshabad, Mamidipalli, Hyderabad pdf.pdfPrestige Orchards Plots in Shamshabad, Mamidipalli, Hyderabad pdf.pdf
Prestige Orchards Plots in Shamshabad, Mamidipalli, Hyderabad pdf.pdf
 
Prestige Somerville Whitefield Bangalore E- Brochure.pdf
Prestige Somerville Whitefield Bangalore E- Brochure.pdfPrestige Somerville Whitefield Bangalore E- Brochure.pdf
Prestige Somerville Whitefield Bangalore E- Brochure.pdf
 
What is Affordable Housing? Bristol Civic Society April 2024
What is Affordable Housing? Bristol Civic Society April 2024What is Affordable Housing? Bristol Civic Society April 2024
What is Affordable Housing? Bristol Civic Society April 2024
 
Raymond Ten X Era Viviana Mall Thane Brochure.pdf
Raymond Ten X Era Viviana Mall Thane Brochure.pdfRaymond Ten X Era Viviana Mall Thane Brochure.pdf
Raymond Ten X Era Viviana Mall Thane Brochure.pdf
 
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...
 
LCAR RE Practice - The Pearson Vue State Exam
LCAR RE Practice - The Pearson Vue State ExamLCAR RE Practice - The Pearson Vue State Exam
LCAR RE Practice - The Pearson Vue State Exam
 
The Role of Mortgage Brokers in Retirement Housing: Key Considerations
The Role of Mortgage Brokers in Retirement Housing: Key ConsiderationsThe Role of Mortgage Brokers in Retirement Housing: Key Considerations
The Role of Mortgage Brokers in Retirement Housing: Key Considerations
 
Provident Solitaire Park Square Kanakapura Road, Bangalore E- Brochure.pdf
Provident Solitaire Park Square Kanakapura Road, Bangalore E- Brochure.pdfProvident Solitaire Park Square Kanakapura Road, Bangalore E- Brochure.pdf
Provident Solitaire Park Square Kanakapura Road, Bangalore E- Brochure.pdf
 
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
 
Vilas Javdekar Yashwin Enchante Pune E-Brochure .pdf
Vilas Javdekar Yashwin Enchante Pune  E-Brochure .pdfVilas Javdekar Yashwin Enchante Pune  E-Brochure .pdf
Vilas Javdekar Yashwin Enchante Pune E-Brochure .pdf
 
Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdf
Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdfKolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdf
Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdf
 
Saheel ITREND Futura At Baner Annexe Pune - PDF.pdf
Saheel ITREND Futura At Baner Annexe Pune - PDF.pdfSaheel ITREND Futura At Baner Annexe Pune - PDF.pdf
Saheel ITREND Futura At Baner Annexe Pune - PDF.pdf
 
Purva Park Hill Kanakapura Road Bangalore.pdf
Purva Park Hill  Kanakapura Road Bangalore.pdfPurva Park Hill  Kanakapura Road Bangalore.pdf
Purva Park Hill Kanakapura Road Bangalore.pdf
 

LUMIA APP LABS: OPTIMISING YOUR NOKIA LUMIA APPS FOR LARGE-SCREEN PHONES

  • 1. LUMIA APP LABS #17 OPTIMISING YOUR APPS FOR LARGE-SCREEN PHONES Lucian Tomuta Chief Engineer Twitter: @ltomuta
  • 2. AGENDA What’s new? New features in Windows Phone Update 3 New Nokia Lumia smartphones Scalable applications supporting 1080p Layouts optimized for large displays? Questions... © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 3. WHAT’S NEW … Windows Phone Update 3 (aka GDR3) Support for more powerful hardware 1080p resolution support Layout optimization for large-screen displays Changes in application memory limits Change in IE’s viewport reported size … more consumer focused features. Windows Phone Preview for Developers © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 4. WHAT’S NEW ... Nokia Lumia 1520 Gorgeous 6’’ display @ 1080p Qualcomm Snapdragon 800 2.2 GHz Adreno 330 2 GB RAM Nokia Lumia 1320 Gorgeous 6’’ display @ 720p Snapdragon S4 1.7 GHz Adreno 330 512 MB RAM © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 5. ALL NEW... 1080P Scale factor: 1.5 (real scale factor is 2.25) © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 6. YOUR EXISTING APP ...will work on 1080p without any* changes. If your application is already declaring 720p layout support – it will install and run scaled-up on the 1080p device If your application does not declare 720p layout support – it will not install on the 1080p device and not be offered by the Windows Phone Store If your application is a WP7.x application (not updated to WP8) it will be made available to 1080p devices, but will run letterboxed © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 7. OPTIMIZE FOR LARGE HD DISPLAYS How can I make my app look better? Detect device’s resolution Design an auto-scaling layout Optimize your graphic assets Optimize your video assets Optimize your fonts © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 8. RESOLUTION DETECTION public enum Resolutions { WVGA, WXGA, HD720p, HD1080p }; public static class ResolutionHelper { static private Size _size; private static bool IsWvga { get { return App.Current.Host.Content.ScaleFactor == 100; } } private static bool IsWxga { get { return App.Current.Host.Content.ScaleFactor == 160; } } private static bool Is720p { get { return (App.Current.Host.Content.ScaleFactor == 150 && !Is1080p); } } private static bool Is1080p { get { if(_size.Width == 0) { try { _size = (Size)DeviceExtendedProperties.GetValue("PhysicalScreenResolution"); } catch (Exception) { _size.Width = 0; } } return _size.Width == 1080; } } public static Resolutions CurrentResolution { get { if (IsWvga) return Resolutions.WVGA; else if (IsWxga) return Resolutions.WXGA; else if (Is720p) return Resolutions.HD720p; else if (Is1080p) return Resolutions.HD1080p; else throw new InvalidOperationException("Unknown resolution"); } } } © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 9. DEVICE EXTENDED PROPERTIES Three new properties available starting with GDR3 System.ArgumentOutOfRangeException will be thrown if queried on earlier OS versions. Property Value type Description PhysicalScreenResolution Size Width / height in physical pixels. RawDpiX Double The DPI along the horizontal of the screen. When the value is not available, it returns 0.0. RawDpiY Double The DPI along the vertical of the screen. When the value is not available, it returns 0.0. © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 10. HIGH RESOLUTION GRAPHICS For a crisp look on the 1080p device, provide high resolution graphics Avoid image distortion by using the correct aspect ratio. © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. public class MultiResImageChooserUri { public Uri BestResolutionImage { get { switch (ResolutionHelper.CurrentResolution) { case Resolutions.HD1080p: case Resolutions.HD720p: //return 16:9 aspect ratio asset, high res return new Uri("Assets/MyImage.screen-1080p.jpg", UriKind.Relative); case Resolutions.WXGA: case Resolutions.WVGA: // return 15:9 aspect ratio asset, high res return new Uri("Assets/MyImage.screen-wxga.jpg", UriKind.Relative); default: throw new InvalidOperationException("Unknown resolution type"); } } } } 11/6/2013 Nokia Internal Use Only
  • 11. HIGH RESOLUTION GRAPHICS Make sure to load the files at needed resolution to reduce memory footprint ... var bmp = new BitmapImage(); // no matter the actual size, this bitmap is decoded to 480 pixels width // aspect ratio preserved and only takes up the memory needed for this size bmp.DecodePixelWidth = 480; bmp.UriSource = new Uri(@"AssetsDemo1080p.png", UriKind.Relative); ImageControl.Source = bmp; ... Optimize asset downloads to minimize data traffic © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 12. ASSETS WITH PREDEFINED SIZES Tiles Smaller on large screen displays due to the 3 columns layout. Use WXGA tile sizes and rely on the platform scaling them down. Splash Screen Provide resolution specific assets. SplashScreenImage.Screen-720p.jpg will be loaded correctly while SplashScreenImage.jpg is letterboxed © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 13. FULL HD VIDEO Full HD video supported, progressive or adaptive We recommend Smooth Streaming technology, allowing the Player Framework to optimized video download based on device’s capabilities and network bandwidth restrictions. Player Framework v1.3 now supports 1080p, get it from http://playerframework.codeplex.com/ © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 14. TYPOGRAPHY Predefined text styles are already optimized for your device. If using custom text styles, please make sure to review their sizes. Scale by 2.25 your title styles For body texts, scale by 1.8 (80%) © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 15. LAYOUT OPTIMISATION It all depends on your app’s function and design. Millimeter perfect UI? Real scale factor is 2.25, not 1.5 as reported by the app. Large display not optimal for single hand usage Move controls closer to user’s fingers More items vs. bigger items Resize your UI elements to fit more useful content on the screen May be necessary on 5’’ or larger devices © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 16. DETECT SCREEN SIZE ... class ScreenSizeHelper { static private double _screenSize = -1.0f; static private double _screenDpiX = 0.0f; static private double _screenDpiY = 0.0f; static private Size _resolution; static public bool IsBigScreen { get { // Use 720p emulator to simulate big screen. if (Microsoft.Devices.Environment.DeviceType == Microsoft.Devices.DeviceType.Emulator) { _screenSize = (App.Current.Host.Content.ScaleFactor == 150) ? 6.0f : 0.0f; } If we can read the new device extended properties, calculate size. if (_screenSize == -1.0f) { try { _screenDpiX = (double)DeviceExtendedProperties.GetValue("RawDpiX"); _screenDpiY = (double)DeviceExtendedProperties.GetValue("RawDpiY"); _resolution = (Size)DeviceExtendedProperties.GetValue("PhysicalScreenResolution"); // Calculate screen diagonal in inches. If we can’t, OS is pre-GDR3, screen size is ~= 4’’ _screenSize = Math.Sqrt(Math.Pow(_resolution.Width / _screenDpiX, 2) + Math.Pow(_resolution.Height / _screenDpiY, 2)); } catch (Exception e) { // We're on older software with lower screen size, carry on. Debug.WriteLine("IsBigScreen error: " + e.Message); _screenSize = 0; } } // Returns true if screen size is bigger than 5 inches - you may edit the value based on your app's needs. return (_screenSize > 5.0f); } } } © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 17. DYNAMIC LAYOUTS How to apply dynamic layouts to an application? Demo. © 2012 Nokia. All rights reserved. © 2012 Microsoft. All rights reserved. 11/6/2013 Nokia Internal Use Only
  • 18. A global app development competition for Nokia Lumia and Windows Phone 8. It’s your chance to win prizes that will get you noticed, including trips to MWC, DVLUP XPs, devices, promotions and much more. Mini Mission 5: Big Screen. 10 other missions still open. ENTER NOW > Nokia.ly/create Nokia Internal Use Only
  • 19. LUMIA APP LABS #16 THANK YOU! QUESTIONS? More information: Nokia Lumia Developer's Library http://developer.nokia.com/Resources/Library/Lumia/ Lucian Tomuta Twitter: @ltomuta