מידע על חיישנים ומיקום
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
במכשירים עם Android יש חיישנים שמאפשרים לספק למשתמשים מידע הקשרי על הסביבה שלהם, כולל מיקום, תנועה, מיקום ותכונות של הסביבה הפיזית.
כדי לספק למשתמשים חוויה עשירה יותר וספציפית יותר להקשר, כדאי להשתמש בממשקי API של Android שמנצלים את היתרונות של סוגי החיישנים הבאים:
אפשר להשתמש ב-GPS כדי להוסיף לאפליקציה מודעות למיקום באמצעות מעקב אוטומטי אחר מיקום, זיהוי של נסיעה בצד הלא נכון של הכביש, גידור גיאוגרפי, זיהוי פעילות ועוד.
שימוש בחיישני תנועה למדידת כוחות תאוצה וכוחות סיבוביים לאורך שלושה צירים. הקטגוריה הזו כוללת מדדי תאוצה, חיישני כוח משיכה, ג'ירוסקופים וחיישני וקטור סיבובי.
אפשר להשתמש בחיישני מיקום כדי למדוד את המיקום הפיזי של מכשיר. הקטגוריה הזו כוללת חיישני כיוון ומגנטומטרים.
משתמשים בחיישני סביבה כדי למדוד פרמטרים שונים של הסביבה, כמו טמפרטורת האוויר והלחץ, התאורה והלחות.
הקטגוריה הזו כוללת ברומטרים, פוטומטרים ומדחומים.
סרטונים
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# About sensors and location\n\nAndroid-powered devices have sensors that let you provide users with contextual\ninformation about their surroundings, including location awareness, motion,\nposition, and qualities of the physical environment.\n\nTo provide a much richer, more more context-specific experience for users, use\nAndroid APIs that take advantage of the following types of sensors:\n\n- Use [GPS](/develop/sensors-and-location/location) to add location awareness to your app with automated location\n tracking, wrong-side-of-the-street detection, geofencing, activity\n recognition, and more.\n\n- Use [motion sensors](/develop/sensors-and-location/sensors/sensors_motion) to measure acceleration forces and rotational forces\n along three axes. This category includes accelerometers, gravity sensors,\n gyroscopes, and rotational vector sensors.\n\n- Use [position sensors](/develop/sensors-and-location/sensors/sensors_position) to measure the physical position of a device. This\n category includes orientation sensors and magnetometers.\n\n- Use [environmental sensors](/develop/sensors-and-location/sensors/sensors_environment) to measure various environmental parameters,\n such as ambient air temperature and pressure, illumination, and humidity.\n This category includes barometers, photometers, and thermometers.\n\nVideos\n------"]]