Presentation is loading. Please wait.

Presentation is loading. Please wait.

Migration to Windows Mobile 6.5 Josh Gittins, Developer Support

Similar presentations


Presentation on theme: "Migration to Windows Mobile 6.5 Josh Gittins, Developer Support"— Presentation transcript:

1 Migration to Windows Mobile 6.5 Josh Gittins, Developer Support
Developer Conference 2010

2 What’s New in Windows Mobile 6.5
Overview Interface Differences - Gestures Widgets Virtual Memory Updating Applications - WM 6.5 DTK

3 Interface Introduction
Gesture Recognition Engine New component that allows for gesture support Based on finger-down/finger-up event pairs - conditions Responsible for identifying gesture type and its specific arguments, start/current position, etc. Physics Engine Handles how display reacts to user’s touch - provided arguments from the gesture Based on control’s speed, angle, and viewable region/boundary

4 Core Gestures

5 Tap Tap: finger/stylus single screen press – touch duration < set threshold time, touch location within a movement perimeter GID_SELECT message sent when finger-down, finger-up events occur within defined time/distance OS sends tap gesture messages similar to standard left click mouse event pairs: finger-down, finger-up -> GID_SELECT --- equivalent to WM_LBUTTONDOWN, WM_LBUTTONUP

6 Double Tap Double Tap: finger/stylus screen press twice quickly - two select gestures within set threshold time, occur within confined perimeter GID_DOUBLESELECT message sent when the finger-up events occur within defined time, distance OS sends double tap gesture messages similar to double left click mouse event: finger-up X 2 -> GID_DOUBLESELECT --- equivalent to WM_LBUTTONDBLCLK

7 Hold Hold: finger/stylus screen press and hold that exceeds SELECT threshold time in a fixed location GID_HOLD message sent if finger-down event held for set duration, followed by GID_END message on finger-up event OS sends hold gesture message similar to right click mouse event: finger-down (x ms) -> GID_HOLD --- equivalent to WM_RBUTTONDOWN, WM_RBUTTONUP

8 Flick Flick: screen swipe - finger/stylus initialize a per-pixel scroll, speed of swipe determines if object continues scrolling after finger is lifted Most complex gesture to recognize - has speed, angle deviation, distance thresholds GID_SCROLL message sent at end of swipe motion upon finger-up event

9 Pan Pan: finger/stylus on screen press and hold exceeds SELECT threshold - continuous as it generates more than one gesture event GID_PAN messages sent with starting point initially, may continue with current coordinates as screen position changes *Note - panning may occur after HOLD gesture; very similar to a click and drag

10 Gesture Notes Architecture: touch events routed from touch-screen drivers to gesture-recognition engine; once gesture type recognized, gesture message posted to GWES message queue For detailed information about the gesture, reference GESTUREINFO structure Receiving process can retrieve details of gesture by calling TKGetGestureInfo

11

12 Gesture Routing Gesture info delivered as WM_GESTURE message – wParam, lParam parameters contain specific message details wParam is the Gesture ID, indicates which gesture is being delivered - lParam is a handle to full gesture information Gesture sequence messages ALWAYS delivered to top active window where initial screen contact was made *Note - unhandled gesture messages sent to Default WndProc for processing; if child control doesn’t support gestures and parent has gesture support, child control should still respond accordingly

13

14 Sample: WndProc - WM_GESTURE
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { case WM_GESTURE: GESTUREINFO gi = {sizeof(GESTUREINFO)}; if (TKGetGestureInfo((HGESTUREINFO)lParam, &gi)) //gi -> pointer to GI struct filled with gesture details passed in WM_GESTURE message TCHAR message[128]; switch (wParam) case GID_SELECT: wsprintf(message, TEXT("SELECT %d %d"), gi.ptsLocation.x, gi.ptsLocation.x); break; case GID_HOLD: wsprintf(message, TEXT("HOLD %d %d"), gi.ptsLocation.x, gi.ptsLocation.x);

15 Brief Physics Engine Intro
New component in WM6.5 to help manage manipulating screen content based on user interaction Module encapsulates a number of algorithms that accept gesture arguments - angle/speed of scroll, decrease speed with specified delimiter Provided initial speed/angle of animation, the engine generates coordinates

16 Boundaries and Display
The boundary is essentially an imaginary rectangle representing the entire control The viewable region is the currently visible portion that user is interacting with inside the boundary Physics Engine specify how control reacts in relation to boundary: Rubber band: viewable region extends temporarily outside boundary, then snaps back to boundary edge with a rubbery effect Standard: viewable region reaches boundary edge, hard stops immediately

17 Bounding rectangle and viewable region must be specified upon physics engine object initialization, along with boundary animation (rubber band, halt) If and when viewable region extends outside the boundary - then the physics engine will use the selected boundary animation to bring back inside boundary

18 Putting It All Together
Applications need to be enhanced to recognize gesture messages, respond accordingly to fully support touch gestures Each window requires standard code to respond to gestures Note - some built-in controls already support gestures by default: LISTVIEW, LISTBOX, TREEVIEW, WEBVIEW, etc. Applications not utilizing standard built-in controls, written to respond to gestures, may use Window Auto Gesture (WAG) API *Out of presentation scope

19 Widgets Widget - lightweight Rich Internet Application (RIA) displayed in container to perform specific tasks Created and stored locally as combination of files and scripts: HTML, CSS, JavaScript, graphics, icons, etc. Metadata: name, author, container, etc.

20 Widgets vs. Applications
Widget (window gadgets): UI control that provides instant interaction point for direct data access/management Used for limited, highly specialized, regularly repeated tasks: (weather, stocks, etc.) Generally linked to web interfaces Applications: Programs usually far more robust, help users perform variety of tasks rather than just one Explicitly open/close, use/free resources, redeploy to update Accessibility to system components, file I/O, custom security

21

22 When to use Widgets If method to complete desired activity already exists Ideal for simple, highly repeatable tasks Rapid, flexible accessibility to particular web interfaces Should be used primarily when just accessing, reading data - rather than writing, storing data

23 Widget Attributes User Interface: HTML body can alter UI based on orientation notifications (landscape, portrait) Localization: locale of device – e.g. en-US or en-UK JavaScript: WM has defined a JavaScript widget object that provides access to specific system state info: Docked, Rotation, Roaming, SignalStrength, BatteryState, etc AJAX: widgets use XMLHttpRequest objects to access data asynchronously from Web

24 Continued… Persistence: ability to access very basic stored data between separate runs; only previously stored data readable* Security: no access to kernel, file I/O, registry, etc. based on Internet Explorer security policies widget must notify user upon paid network access (WWAN)

25 Deploying Widgets Marketplace: widget submitted to online application store where it can be purchased or downloaded for free Sideload Deploy: widget deployment files transferred directly to the device; the following registry entries are required: [HKEY_CLASSES_ROOT\riapp] "EditFlags"=dword: [HKEY_CLASSES_ROOT\riapp\Shell\Open\Command] Default=wmwidgetinstaller.exe %1 Without these entries, the widgets are unable to install to device Files are extracted from widget file and placed in \Program Files..\..

26

27 Default Widget There is a default widget installed:
\Program Files\Widgets\User\1 Widgets need not be reinstalled to update certain components: e.g. to use different widget icon, simply update manifest file with newly transferred image name Can be uninstalled like regular apps from Remove Programs Interface

28 Basic Widget Manifest <name> text displayed below widget icon <content src> passes the initial destination as an HTML object <access network> boolean to enable network access; - *disabled by default <icon src> passes the image file name/extension for widget’s icon <description> brief summary of the widget’s function(s) prior to the install - Config.xml is the widget’s configuration/manifest file

29

30 Virtual Memory 32 processes total, each process only 32MB of space
Each process has individual 32MB slot Addressable space is usually lower due to OS/OEM components As user fills memory with dlls, there is less space for OS to dynamically allocate others - which often results in memory errors More physical memory has no relevance - can’t be addressed

31 VM Improvements in WM 6.5 Slots can handle both Module and File dlls Platform Advantages: Memory usage of both code and data reduced in slot 0 (the current-process slot) - improves overall stability *Loaded on 4K boundaries which utilizes space more efficiently, rather than 64KB in former WM platforms. Module dlls are allocated to VM at build time, are loaded more efficiently (related to platform level development, not end user software - end user applications still use standard file dlls)

32 VM Best Practices Reduce code size if possible, particularly dlls allocated to slot 0 Reduce data size, vital since all data is allocated to slot 0 Consolidate multiple small dll files into one larger dll - reduces space due to alignment of 4KB or 64KB, esp. latter Statically link if possible: Code becomes part of the executable Loads at bottom of VM space No DLL loads, so won’t impact VM of other processes

33 Windows Mobile 6.5 DTK Includes:
Samples - both native and managed Libraries Documentation Visual Studio Tools *WM 6 SDK required* Direct MSDN download link to WM6.5.3 DTK provided in resources slide

34 Migrating Applications to WM 6.5
Majority of applications built for Windows Mobile 5 or later devices run on Windows Mobile 6.5 without modification Applications built with functionality implemented in Windows Mobile 6.5 may feel and react differently if run on Windows Mobile 5|6 platforms

35 IDL Migration Keep in mind there are BETA resource kits for CS40, etc.
Kits include new runtimes to utilize new components in Windows Mobile 6.5 *Should be backwards compatible with former devices/prior platforms

36 WM 6.5 Resources For further detail on the topics covered in this presentation, reference the following: Gestures: Physics: Widgets: Virtual Memory: Random Features (Native): WM6.5 DTK: WM6.5.3 DTK:

37 Contact Developer Support: Dev_Supt@CustHelp.com
Technical Support: Opt. 4 Developer Forum: Developer Center:

38 Comments or Questions

39 Thank you.


Download ppt "Migration to Windows Mobile 6.5 Josh Gittins, Developer Support"

Similar presentations


Ads by Google