คุณสามารถใช้ Snapshot API
เพื่อดูข้อมูลเกี่ยวกับสภาพแวดล้อมปัจจุบันของผู้ใช้ เมื่อใช้ Snapshot API
คุณสามารถเข้าถึงสัญญาณบริบทได้หลายแบบ ดังนี้
กิจกรรมที่ผู้ใช้ตรวจพบ เช่น เมื่อเดินหรือขับรถ
บีคอนที่อยู่ใกล้เคียงซึ่งคุณลงทะเบียนไว้
สถานะหูฟัง, เสียบปลั๊กอยู่หรือไม่
ตําแหน่ง ซึ่งรวมถึงละติจูดและลองจิจูด
ระบบจะแคชค่าเหล่านี้เพื่อให้แสดงผลได้อย่างรวดเร็ว หากไม่มีข้อมูล ระบบจะตรวจหาและอนุมานเพื่อแสดงค่าสถานะใหม่
Awareness API จะแสดงประเภทข้อมูลที่มีอยู่สําหรับประเภทบริบทที่มี API สาธารณะ
[[["เข้าใจง่าย","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"]],["อัปเดตล่าสุด 2023-09-14 UTC"],[[["The Places and Weather contextual signals within the Awareness API are deprecated and have been turned off, with existing implementations restricted until specified dates."],["Developers should utilize the Places SDK for Android instead of the Places contextual signal for new implementations."],["Google does not offer alternative functionality for the Weather contextual signal, impacting existing implementations relying on it."],["The Awareness API continues to provide other contextual signals through the Snapshot API, including user activity, nearby beacons, headphone state, and location."],["Developers can access these signals using corresponding Snapshot API methods and retrieve relevant data for their applications."]]],[]]