2 Rodriguez 2 Rodriguez 2 Rodriguez2 Rodriguez2 Rodriguez2 Rodriguez
Integrating with Windows Phone Hardware Jaime Rodriguez
description
Transcript of Integrating with Windows Phone Hardware Jaime Rodriguez
Integrating withWindows Phone Hardware
Jaime Rodriguezhttp://blogs.msdn.com/jaimer, @jaimerodriguez
Agenda
Keyboard Touch
Silverlight XNA
Accelerometer Audio Video Location Compass
Keyboard
Silverlight TextBox integrates with the SIP Supports and scrolling Password has a delay
SIP supports input scoping Key InputScopes: Text, Url, Number, Time,
TelephoneNumber, EmailNameOrAddress
Demo
Software Keyboard and Input Scope
Touch (in Silverlight)
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
Coming later, before v1 RTT: Raw Touch, compatible with SL3
Demo
Touch in SIlverlight
Touch in XNA
TouchPanel public static TouchPanelCapabilities GetCapabilities(); public static TouchCollection GetState();
TouchLocation public Vector2 Position { get; } public int Id { get; } public bool TryGetPreviousLocation (out TouchLocation
… );
Accelerometer
Measures force applied on each axis over time
+Y
-Y
+X-X
+Z
-Z
Demo
Accelerometer
Audio Input
Mic input Gives access to raw PCM WAV data Calls BufferReady event at regular intervals Call the GetData method from the BufferReady event
or as often as your app requires 10ms latency
Media
Media support H/W decode MediaStreamSource PlayReady DRM
MediaElement Limitations One MediaElement only No VideoBrush
XNA sound effect API Supports polyphonic, looping wav data
Vibration
Vibrates the phone for a given duration Useful for haptic feedback Notifying users of updates
VibrateController vc = VibrateController.Default;vc.Start(TimeSpan.FromSeconds(2));// vc.Stop (); //to stop it before the timespan
Demo
Vibrate & Media
location
Location services
WiFi
+ Accuracy- Power- Speed- Indoors
- Accuracy+ Power+ Speed- Wilderness
+/- Accuracy+/- Power+/- Speed+/- Urban areas
GPS
Cell towers
Location Services
Smart device + cloud service
Balance accuracy with time & power
Consistent API across platforms
Demo
location services
Thanks!! Questions ?