ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
การช่วยเตือนการเข้าถึงตำแหน่งในเบื้องหลัง
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Android 10 มีฟีเจอร์การช่วยเตือนการเข้าถึงตำแหน่งในเบื้องหลัง ซึ่งจะเพิ่มความโปร่งใสเกี่ยวกับระดับการเข้าถึงตำแหน่งของอุปกรณ์ที่แอปมี และช่วยให้ผู้ใช้ควบคุมการเข้าถึงดังกล่าวได้ ใน Android 9 และต่ำกว่า แอปสามารถติดตามตำแหน่งของอุปกรณ์ขณะทำงานในเบื้องหลังโดยที่ผู้ใช้ไม่ทราบ ผู้ใช้สามารถระงับลักษณะการทำงานนี้ได้ใน Android 10 โดยเลือกสิทธิ์เข้าถึงตำแหน่งเป็นอนุญาตขณะใช้แอปเท่านั้นหรือปฏิเสธ
รูปที่ 1 การช่วยเตือนการเข้าถึงตำแหน่งในเบื้องหลัง
ระบบจะทริกเกอร์การช่วยเตือนเมื่อแอปเข้าถึงข้อมูลที่ได้รับความคุ้มครองโดยวิธีการเข้าถึงตำแหน่งที่ละเอียด ACCESS_FINE_LOCATION
ขณะทำงานในเบื้องหลัง การช่วยเตือนจะไม่แสดงกิจกรรมเบื้องหลังทั้งหมดของแอปทั้งหมดในการแจ้งเตือนเดียวเพื่อป้องกันไม่ให้ผู้ใช้ถูกรบกวนโดยไม่จำเป็น ผู้ใช้จะเห็นการช่วยเตือนสูงสุด 1 ครั้งต่อวัน เมื่อคำขอเข้าถึงทริกเกอร์การช่วยเตือนการเข้าถึงตำแหน่งในเบื้องหลัง การช่วยเตือนจะแสดงในภายหลังในวันเดียวกัน วันถัดไป หรือหลายวันหลังจากนั้น ทั้งนี้ขึ้นอยู่กับจำนวนการช่วยเตือนทั้งหมดที่ต้องแสดง เช่น การแจ้งเตือนทั้งหมด 3 รายการใช้เวลา 72 ชั่วโมงจึงจะแสดง
การแจ้งเตือนจะไม่ทริกเกอร์สำหรับรายการต่อไปนี้
- แอปที่ได้รับสิทธิ์โดยค่าเริ่มต้น เช่น บริการของระบบ
- แอปที่ได้รับสิทธิ์เข้าถึงตำแหน่งแบบอนุญาตตลอด ซึ่งเข้าถึงตำแหน่งของอุปกรณ์ในเบื้องหลังเป็นครั้งแรกแล้ว
- แอปที่ได้รับการอัปเดตตำแหน่งในเบื้องหน้าเท่านั้น
- แอปที่ได้รับการอัปเดตตำแหน่งคร่าวๆ เท่านั้น
แอปที่ติดตั้งมาล่วงหน้าส่วนใหญ่จะได้รับสิทธิ์โดยค่าเริ่มต้น คุณไม่จำเป็นต้องดำเนินการใดๆ เพื่อใช้ฟีเจอร์การช่วยเตือนการเข้าถึงตำแหน่งในเบื้องหลัง และคุณไม่สามารถปรับแต่งฟีเจอร์นี้ได้ ฟีเจอร์นี้ได้รับการทดสอบโดย CTS
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","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-07-27 UTC"],[],[],null,["# Background location access reminder\n\nAndroid 10 features a background access location reminder, which\nincreases transparency into how much access apps have to a device's location and helps users\nmaintain control over such access. In Android 9 and lower, an app can track a device's location\nwhile running in the background without the user's knowledge. Users can suppress this behavior in\nAndroid 10 by\nselecting either the **Allow only while using the App** or **Deny**\nlocation access permission.\n\n**Figure 1.** Background location access reminder.\n\nA reminder gets triggered when an app accesses data protected by the fine-location permission\nmethod [`ACCESS_FINE_LOCATION`](https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION)\nwhile in the background. To prevent unnecessary interruptions to the user, the reminder doesn't\nshow all background activity for all apps in a single notification. The user sees one reminder\nper day, maximum. When an access request triggers the background location access reminder, it\nshows either later in the same day, the next day, or days later, depending on\nhow many total reminders needed to be pushed. For example, a total of 3\nnotifications takes 72 hours to show.\n\nNotifications aren't triggered for the following:\n\n- Apps that have permission granted by default, such as system services.\n- Apps that are granted **Allow all the time** location access permission, that have already accessed the device location in the background for the first time.\n- Apps that receive location updates in the foreground only.\n- Apps that receive coarse-location updates only.\n\nMost preinstalled apps have their permissions granted by default. You don't\nneed to take any action to implement the background location access reminder\nfeature, and you can't customize it. This feature is tested by CTS."]]