Integrating with Windows Phone Hardware Jaime Rodriguez
Agenda Keyboard Touch Silverlight XNA Accelerometer Audio Video Location Compass
Keyboard
Demo Software Keyboard and Input Scope
Touch (in Silverlight)
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
Accelerometer AccelerometerSensor ReadingChanged even Start () Stop () AccelerometerReading X - Y – 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 + Accuracy - Power - Speed - Indoors - Accuracy + Power + Speed - Wilderness +/- Accuracy +/- Power +/- Speed +/- Urban areas GPS
Location Services Smart device + cloud service Balance accuracy with time & power Consistent API across platforms
Demo location services
Thanks!! Questions ?