קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
פעולה במכשיר
אנשים שמחפשים עזרה יכולים לבקש מספק לבצע פעולה. אם הספק תומך בפעולה, הוא צריך לאשר אותה ולבצע אותה. אחרת, הוא צריך להתעלם ממנה.
שם קבוצת ההודעות
ערך
אירוע פעולה במכשיר
0x04
שם הקוד של פעולה במכשיר
ערך
צלצול
0x01
השמעת צלצול במכשיר
תרחיש לדוגמה לשימוש בפעולות האלה הוא בקשה של המשתמש מהספק להפעיל צלצול במכשיר, למשל אם המשתמש איבד את המכשיר וצריך לאתר אותו. כשמתקבלת פעולת הצלצול, הספק צריך להתחיל להשמיע קובץ קול שנטען מראש בעוצמת קול גבוהה מספיק כדי שהמשתמש יוכל לאתר אותו. מומלץ להגביר את עוצמת הקול בהדרגה מעוצמה נמוכה לעוצמה מקסימלית. הצלצול צריך להימשך עד שתתקבל פעולה נוספת שמורה על הפסקה, או עד שערך הזמן הקצוב לתפוגה יחלוף.
הודעה תכלול נתונים נוספים כדי לציין אם צריך להתחיל או להפסיק את הצלצול. אפשר להרחיב את ההודעה כדי לתמוך בספקים עם כמה רכיבים (אוזנייה שמאלית ואוזנייה ימנית). בבייט הראשון, הביטים יוגדרו ל-1 כדי לבקש צלצול להתחלה או ל-0 כדי לבקש צלצול להפסקה.
לדוגמה, אם הבייט הראשון של הנתונים הנוספים מוגדר כך:
0x00 (0b00000000): כל הרכיבים צריכים להפסיק לצלצל
0x01 (0b00000001): צלצול באוזן ימין, הפסקת הצלצול באוזן שמאל
0x02 (0b00000010): השמעת צלצול בצד שמאל, הפסקת הצלצול בצד ימין
0x03 (0b00000011): צלצול באוזן ימין ובאוזן שמאל
בספקי שירות שלא תומכים בהתקשרות נפרדת, צריך להתייחס רק לביט אחד:
0x00 (0b00000000): הפסקת הצלצול
0x01 (0b00000001): התחלת הצלצול
הבייט השני בנתונים הנוספים, אם הוא קיים, מייצג את הזמן הקצוב לתפוגה בשניות. הספק צריך להשתמש בערך הזה כדי לקבוע כמה זמן הטלפון יצלצל לפני שהוא יושתק. על סמך הדוגמה שלמעלה לגבי צלצול ופסק זמן של 60 שניות, הערך 0x013C יועבר כנתונים נוספים.
סנכרון סטטוס השיחה בחזרה למחפשי העבודה
ספקי שירותים יכולים להודיע למשתמש שמחפש עזרה כשהסטטוס של השיחה משתנה, למשל אם תנועה גורמת להפסקת הצלצול. לאחר מכן, המשתמש יוכל לקבל את ההודעה ולעדכן את ממשק המשתמש אם צריך.
הספק צריך להשתמש באותו פורמט הודעה שמוגדר בדוגמה שלמעלה. המחפש יאזין להודעה הזו ויספק אישור כשהיא תתקבל.
אישור פעולה
כשמתקבלת פעולה, צריך לאשר אותה כדי שהמבקש יידע אם הפעולה בוצעה או לא. אם לא מתקבל אישור תוך שנייה אחת משליחת פעולה (או שמתקבל אישור שלילי), המודול Seeker יניח שהפעולה לא נתמכת כרגע.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-08-13 (שעון UTC)."],[[["\u003cp\u003eSeekers can request Providers to perform actions, such as ringing, which should be acknowledged and performed if supported.\u003c/p\u003e\n"],["\u003cp\u003eRinging can be initiated and stopped for single or dual components (like earbuds) using specific data values, with optional timeout duration.\u003c/p\u003e\n"],["\u003cp\u003eProviders can notify Seekers of ringing status changes, enabling UI updates on the Seeker's end.\u003c/p\u003e\n"],["\u003cp\u003eSeekers expect acknowledgements within 1 second to confirm action execution, otherwise assuming unsupported functionality.\u003c/p\u003e\n"],["\u003cp\u003eDevice actions use a specific message group and action codes for communication between Seekers and Providers.\u003c/p\u003e\n"]]],["Seekers request Providers to perform actions, like ringing. Providers acknowledge and execute supported actions or ignore unsupported ones. The \"Ring\" action (0x01) initiates a preloaded sound, potentially ramping up in volume until stopped or timed out. The first data byte indicates which components (e.g., left/right) should ring, using bit flags (1 for start, 0 for stop). The second byte sets a timeout in seconds. Providers should update Seekers of changes to the ringing status, and Seekers must acknowledge the action.\n"],null,["Device action\n-------------\n\nSeekers can request that a Provider takes an action. If the action is supported\nby the Provider, it should be acknowledged and performed, otherwise it should be\nignored.\n\n| Message Group Name | Value |\n|---------------------|-------|\n| Device action event | 0x04 |\n\n| Device Action Code Name | Value |\n|-------------------------|-------|\n| Ring | 0x01 |\n\n### Ringing a device\n\nOne use case for these actions is the Seeker requesting the Provider to ring,\nfor example when a user has lost the device and needs to locate it. When the\nring action is received, the Provider should begin playing a preloaded sound\nfile at a high enough volume that the user is able to locate it. It is\nrecommended that the sound be ramped from a low volume to max volume over\ntime. Ringing should continue until an additional action is received\ndirecting a stop, or a timeout value has passed.\n\nAdditional data will be included in the message to indicate whether the ringing\nshould be started or stopped, which can be expanded to support Providers with\nmultiple components (a left and right bud). In the first byte, bits will be set\nto 1 to request a ring to start or 0 to request a ring to stop.\n\nFor example, if the first byte of additional data is set to:\n\n- 0x00 (0b00000000): All components should stop ringing\n- 0x01 (0b00000001): Ring right, stop ringing left\n- 0x02 (0b00000010): Ring left, stop ringing right\n- 0x03 (0b00000011): Ring both left and right\n\nOn Providers which do not support individual ringing, only 1 bit should be\nconsidered:\n\n- 0x00 (0b00000000): Stop ringing\n- 0x01 (0b00000001): Start ringing\n\n| **Note:** For Providers that include on-head detection, consider checking whether the device is on-head before ringing at max volume.\n\nThe second byte in additional data, if present, represents the timeout in\nseconds. This value should be used by the Provider to determine how long it\nshould ring before silencing itself. Based off of the ring right example above\nand a timeout of 60 seconds, `0x013C` would be passed as the additional data.\n\n#### Syncing ringing status back to Seekers\n\nProviders may want to notify a Seeker when it changes the ringing status, for\nexample if a gesture causes the ringing to stop. The Seeker can then receive\nthe message and update the UI if necessary.\n\nThe Provider should follow the same message format as defined in the example\nabove. Seeker's will listen for this message and provide an acknowledgement when\nit is received.\n\n### Acknowledging an action\n\nWhen an action is received, it should be\n[acknowledged](/nearby/fast-pair/specifications/extensions/acknowledgement#MessageStreamAcknowledgements \"Acknowledgements\") so that the Seeker knows whether\nor not the action was performed. If an acknowledgement is not received within 1\nsecond of sending an action (or a negative-acknowledgement is received) the\nSeeker will assume the action is not currently supported."]]