[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eGlassware UX leverages common patterns built with UI elements like static cards, live cards, and immersions, invoked via voice or touch.\u003c/p\u003e\n"],["\u003cp\u003eVoice commands prioritize user actions, speed, colloquialism, and broad applicability for efficient and intuitive interaction.\u003c/p\u003e\n"],["\u003cp\u003eOngoing tasks utilize live cards for persistent activities like the Stopwatch, allowing users to return after navigating away.\u003c/p\u003e\n"],["\u003cp\u003eImmersions, such as Android activities, temporarily replace the timeline, requiring a swipe down to return.\u003c/p\u003e\n"],["\u003cp\u003ePeriodic notifications, like news or emails, are delivered as static cards to the timeline based on user-defined settings.\u003c/p\u003e\n"]]],[],null,["# Patterns\n\nUse common UX patterns to give users a consistent experience\nacross all Glassware.\n\nHere you'll learn about the basic building blocks\nto build these patterns along with examples\nof patterns that we feel work great on Glass.\n\nPattern building blocks\n-----------------------\n\nBy using the major UI elements along with an invocation method, you\ncan build a wide variety of usage patterns that work well on Glass.\nYou can then combine multiple patterns together in your Glassware\nfor the use cases that you require.\n\n**UI elements**\n\n1. Static card - Displays text, HTML, images, and video. Static cards can invoke live cards or immersions.\n2. Live card - Displays cards that are important at the current moment, usually rendered at a high frequency.\n3. Immersion - Displays Android activities that take over the timeline experience.\n\n**Invocation methods**\n\n1. **ok glass** touch or voice menu\n2. Contextual voice or touch menu on a timeline card\n\n### Voice invocation model\n\nVoice commands are a major part of user interaction with Glass and allow\nusers to do things hands-free, quickly, and naturally. How\na voice command starts the interaction with users is an integral\npart of the Glassware experience.\n\nWe carefully select voice commands to include on the **ok glass** menu\nbased on a set of criteria. See the [voice command checklist](/glass/distribute/voice-checklist)\nfor complete details about what we look for in a good voice command. In general, voice commands adhere to\nthe following guidelines on Glass.\n\nFocus on the action, not the agent\n\n: Voice commands should be based on what users want to do and not what Glassware is carrying\n out the action.\n\n For instance \"ok glass, take a picture\" is preferred over \"ok glass, start camera.\"\n Focusing on the action is a more natural way for user interaction and\n all of the main voice commands follow this guideline.\n\nDecrease time from intent to action\n\n: Voice commands should carry out the action as quickly as possible.\n\n For instance, \"ok glass, listen to Led Zeppelin\" starts playing\n music by default and doesn't force users to select options before playing.\n\nIs colloquial and easy to say\n\n: Voice commands are natural sounding, are different enough from existing commands, and\n are at least two words. This lets us tune our voice recognition to work well with\n a wide variety of commands.\n\nIs general enough to apply to multiple Glassware\n\n: To avoid clutter on the **ok glass** voice and touch menus, voice\n commands should work for multiple Glassware if necessary.\n In these situations, Glass automatically shows a menu\n with the names of the Glassware that can carry out the command.\n\n For instance, \"ok glass, play a game, spellista\" is preferred over\n \"ok glass, play spellista.\"\n\nPatterns\n--------\n\n### Ongoing task\n\nOngoing tasks are long-running live cards that users leave and come\nback to frequently.\n\nFor example, the Stopwatch sample that is shipped with the GDK\nstarts the stopwatch with an **ok glass** command.\n\nUsers can view the stopwatch for some time, navigate through\nthe timeline to check other cards, and come back to the stopwatch.\nIf the display sleeps, the stopwatch is the default card that\ndisplays when the display wakes up (as long as it had focus when\nthe display went to sleep). Users can stop the stopwatch by\ntapping on a **Stop** menu item.\n| **Note:** All live cards must have a **Stop** menu item (or similar) to dismiss the card.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\nAnother example of an ongoing task is Strava.\nStrava inserts a live card that contains a timer\nfor a current run or bike ride. Tapping on the live card reveals\nmenus to carry out a wide array of options. A finish menu item removes\nthe live card from the timeline when users are finished with\ntheir run or bike ride.\n\n### Immersion\n\nThis pattern describes displaying immersions in the form of\nAndroid activities. Immersions take over the timeline experience\nmomentarily and users return back to the timeline by swiping\ndown.\n\n### Periodic notifications\n\nThis pattern describes inserting static cards in the timeline\nwithout an invocation model. Your service delivers\nnotifications based on settings that the user defines. For example,\ndelivering top news stories every hour or emails as they are received.\n\nNotifications leverage Mirror API web services or Android background services\non Glass to push notifications to the timeline."]]