Designing Microsoft Surface Applications for Tagged Objects
Tagged objects provide many new scenarios for Microsoft Surface applications. However, when you create an application that is driven by tagged objects, there are unique design considerations to remember.
For an example of an application that is designed for tagged objects, see the Item Compare sample application. For a tutorial about how Item Compare is designed as a tag-driven application, see Designing Tag-Driven Applications for Microsoft Surface.
Choosing a Tag Type
Byte tags store 8 bits of data (1 byte), so there are 256 unique tag values. Byte tags measure ¾ inch on each side, and the Vision System can reliably track them at relatively high speeds (over 4 inches per second) as they move across a Microsoft Surface screen.
Identity tags store 128 bits of data (two 64-bit values), so there is an effectively unlimited range of unique tag values. Identity tags measure 1 inch on each side, and they function best when they are stationary or nearly stationary. The Vision System can track identity tags at a maximum speed that is considerably lower than the maximum speed for byte tags.
Because byte tags are more compact and are faster for the Vision System to recognize, they represent the best choice for an object-driven application if the number of unique tag values that you need is relatively small (for example, identifying pieces in a board game). However, byte tags have only 256 possible values, so they may not be appropriate for some applications.
If your application must distinguish among a large number of unique values (for example, if the tag represent a unique customer ID from a large database), identity tags are the best choice.
|Although you can use identity tags to provide logon credentials, you should not use them as the only means of authentication because malicious users can copy or guess tags. Any authentication scheme that is based on tag values should also require another form of information, such as a PIN or password.|
Reacting to Tagged Objects
If you are creating an application based on the Presentation layer, your application can respond to tagged objects most easily by using the TagVisualizer control. This control can recognize, track, and show user interface (UI) elements for tags that are placed on the control.
If you want to use custom processing (or if you are writing an application based on the Core layer), your application can respond to tagged objects by watching for Contact objects whose IsTagRecognized property is set to true. When that property is true, you can use the Tag property on the contact to get information about the type and value of tag that has been recognized.
Starting Applications with Tagged Objects
A user's first experience with your application is how to start it. If your application is designed to be driven primarily by tagged objects, consider integrating it with the object routing feature. Object routing enables users to start your application without going through Launcher. Ideally, after a user opens your application by using a tagged object, the application will use the tag value in some way. For more information, Using Object Routing with Tagged Objects.
Printing Tagged Objects
A Microsoft Surface application relies solely on the orientation and position of a tag (instead of the physical object that the tag is attached to), so the Microsoft Surface platform needs to know where the tag is located on the physical object the tag is placed. The location enables the platform to infer the location of the object based on the location of the tag. Depending on the physical requirements of your tagged object, you might need to place the tag somewhere other than its center. In such a case, you should correct for the location of the tag so your application can show the UI for the tag in the appropriate position.
If you use the TagVisualizer control, you can use the PhysicalCenterOffsetFromTag and OrientationOffsetFromTag properties of the TagVisualization object to correct for tag placement. For more information, see Specifying Physical Attributes of Tagged Objects.
For more information about how to create and print tags for the physical objects, see Printing Tagged Objects. For information about how to create and print identity tags, see Identity Tag Printing Tool.