Nickolas Landry, MVP Principal Architect Infusion Development WMB304 Who Is ActiveNick? Principal Architect Practice Manager – Enterprise Mobility, HPC Business Dev Manager – LIS Infusion Development –

Download Report

Transcript Nickolas Landry, MVP Principal Architect Infusion Development WMB304 Who Is ActiveNick? Principal Architect Practice Manager – Enterprise Mobility, HPC Business Dev Manager – LIS Infusion Development –

Nickolas Landry, MVP
Principal Architect
Infusion Development
WMB304
Who Is ActiveNick?
Principal Architect
Practice Manager – Enterprise Mobility, HPC
Business Dev Manager – LIS
Infusion Development – New York City
Blog: http://home.infusionblogs.com/nlandry
Corporate: http://www.infusion.com
Web: http://www.activenick.net
Email: [email protected]
16+ years of professional experience
Microsoft MVP: Device Application Development
(a.k.a. .NET Compact Framework MVP)
Member of INETA Speakers Bureau
Speaker at many events worldwide
(Tech·Ed, MEDC, DevConnections, DevTeach,
Code Camps, user groups, workshops, etc.)
Who Is ActiveNick? (Cont’d.)
Vice-President of IASA New York
Specializes in enterprise mobility, architecture, Virtual Earth,
smart clients, high performance computing (HPC),
game development with XNA, Microsoft Robotics Studio, …
.NET Mobility Blogger & Author –
CoDe Magazine: Mobile CoDe.NET,
MSDN White Papers & others
Adopted Visual Basic at v.1.0 in 1992
Former MSDN Regional Director (Mtl)
Microsoft Certified, IBM Certified on XML
WWISA – Founding Member
Assumptions & Disclaimers
This is a level 300 session!
You already know the basics of Windows Mobile
development with .NET Compact Framework
Making things easy:
Windows Mobile 6 Professional = Pocket PC
Windows Mobile 6 Standard = Smartphone
All demos in this session apply to both
Windows Mobile 6.1 & 6.5
Based on hardware-specific APIs
Agenda
Windows Mobile Device Input Options
Mobile UI Design Guidelines & Best Practices
Next Generation Input for Devices
Windows Mobile Unified Sensor API (Codeplex)
Working with Accelerometers
Working with Light Sensors
Detecting Simple Touch Screen Gestures
Provide Sensory Feedback to Users
Summary
Windows Mobile Device Form Factors
Pocket PC (including Pocket PC Phone)
Tactile screen, stylus, standard buttons
QWERTY Keyboard: Built-in, “slideable”, none
Smartphone
Numeric keypad or full QWERTY keyboard
No stylus, cursor keys
Industrial/Embedded
“Ruggedized” Pocket PCs
Numeric/Alphanumeric keypads
Handheld PC
Clamshell, Tablet-style
VGA, ½-VGA screen
QWERTY Keyboard
Understanding the Windows Mobile
User Interface
Limited Screen Real Estate
Limited Memory Environment
Touch-Sensitive Screen on Pocket PCs:
Stylus or Finger Input
Soft Input Panel (Pocket PC)
Hardware Keys
Built-in/slideable Keyboards
(on certain models)
Numeric Keypad (Smartphone)
Voice Commands
Key User Interface Principles
Design a new UI for a mobile device,
don’t port your desktop UI
Completely redesign the user interface
Business logic may be reusable
Choose the correct model based on the form factor
Pocket PC should always be full-screen
Limit free text entry on devices with no keyboards
Keep the user interface simple
Avoid control overcrowding
Limit the required number of clicks as much as possible
Take advantage of new UX hardware options!
New UX Hardware Options
User Experience (UX) includes input & output
Touch Screen Gestures
Feedback via Vibration
Feedback via Sounds
Accelerometers
Light Sensors
Navigation Wheels
Capacitive Touch Screens*
Not featured on any Windows Mobile device announced to date
Windows Mobile Unified Sensor API
Allows developers to easily access the hardware
sensors that are available on various devices
Accelerometer (GSensor)
Light Sensor
Stylus Sensor
Navigation Wheel
CodePlex Open Source Community Project
http://sensorapi.codeplex.com
Created by Koushik K. Dutta
http://www.koushikdutta.com
Devices: HTC Touch*, Samsung Omnia/Instinct
Accelerometer: GSensor
Return a device orientation vector
The vector is the direction of force relative to the orientation of
the device.
Tilt X: 0 is flat, -1000 to +1000
Tilt Y: 0 is flat, -1000 to +1000
Tilt Z: 0 is straight up, -1000 is flat, 1000 is face down
Switch between landscape/portrait mode
Can be used to as an alternative to
4-way cursor keys
Create a new light sensor with
HTCSensorOpen(HTCSensor.GSensor)
in HTCSensorSDK.dll
+Y
-X
-Z
+Z
+X
-Y
Windows Mobile Unified Sensor API
Working with the Accelerometer using GSensor
Light Sensor
Return the ambient luminance based on a
device’s light sensor
Single numerical value
Ranges from 0 to 30
Change UI color scheme based on
ambient lighting
Create a new light sensor with
HTCSensorOpen(HTCSensor.Light)
in HTCSensorSDK.dll
Windows Mobile Unified Sensor API
Detecting Ambient Lighting with LightSensor
Touch Screens & Gestures
Windows Mobile devices use a resistive touch screen:
single touch point
Can detect simple gestures using the “mouse” events
in .NET Compact Framework
Stylus and fingers fire mouse events in
Compact Windows Forms
MouseDown: Capture the start position
MouseUp: Detect end position, calculate direction, even the
distance if needed
Track the position with MouseMove if the user
goes off-screen
Detecting Simple Screen Gestures
Tracking the Stylus with “Mouse” Events in WinForms
Providing Feedback to the User
Visual Cues on Screen
Playing Sounds
Vibrating the device
Playing Sound in NETCF 3.5
// Play custom sound files with SoundPlayer
Dim soundplayer As New Media.SoundPlayer
With soundplayer
.SoundLocation = "\My Documents\My
Ringtones\murloc.wav"
.Play()
End With
// Play standard system sounds
Media.SystemSounds.Asterisk.Play()
Media.SystemSounds.Beep.Play()
Media.SystemSounds.Exclamation.Play()
Media.SystemSounds.Hand.Play()
Media.SystemSounds.Question.Play()
Summary
Users expect more from their mobile devices
Create a next generation user experience (UX)
Tap into the advanced hardware capabilities of your
Windows Mobile devices
Make your device application input intuitive
Use simple gestures to add another layer of interaction
to your mobile application
Provide audible and sensory feedback
to your users
Download and test drive the Windows Mobile
Unified Sensor API from CodePlex
Additional Resources
Windows Mobile Developer Center @ MSDN Online
http://msdn.microsoft.com/en-us/windowsmobile/default.aspx
Koushik Dutta’s Blog: My Brain Hurts
http://www.koushikdutta.com
Microsoft Mobile Development Handbook
By Andy Wigley, Daniel Moth, Peter Foot – Microsoft Press (2007)
Additional Resources
Mobile WCF Session Thursday (WMB401)
Upcoming White Paper on WCF Mobile
Co-authored by Michele Leroux Bustamante
& Nickolas Landry
http://wcfguidanceformobile.codeplex.com
Overview
Getting Started with Windows Mobile Development
WCF Primer for Mobile Developers
Code Samples: Greeting, ToDo, WS-Security, etc.
Differences from Full WCF to Mobile WCF
Contract Design, Proxy Generation, Bindings
Debugging, Exception Handling, Message Headers
REST-based Services, Mobile WCF Security, etc.
Michele’s Blog: www.dasBlonde.net
Nick’s Blog: home.infusionblogs.com/nlandry
home.infusionblogs.com/nlandry
www.infusion.com
[email protected]
Resources
www.microsoft.com/teched
www.microsoft.com/learning
Sessions On-Demand & Community
Microsoft Certification & Training Resources
http://microsoft.com/technet
http://microsoft.com/msdn
Resources for IT Professionals
Resources for Developers
www.microsoft.com/learning
Microsoft Certification and Training Resources
Windows Mobile® Resources
TechNet TechCenter – System Center Mobile Device Manager 2008
http://technet.microsoft.com/scmdm
TechNet TechCenter – Windows Mobile
http://technet.microsoft.com/windowsmobile
MSDN Center – Windows Mobile
http://msdn.microsoft.com/windowsmobile
Webcasts and Podcasts for IT – Windows Mobile
http://www.microsoft.com/events/series/msecmobility.aspx
General Information – Windows Mobile
http://www.windowsmobile.com
General Information – System Center Mobile Device Manager 2008
http://www.windowsmobile.com/mobiledevicemanager
Windows Marketplace Developer Portal
http://developer.windowsmobile.com
Windows Mobile®
is giving away
Blackjack II's !
Stop by the Windows Mobile
Technical Learning Center to
learn how to enter.
Complete an
evaluation on
CommNet and
enter to win!
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should
not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.