Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Android 11, kullanıcı gizliliğini daha iyi korumak için tek seferlik konum erişimi ekler ve kullanıcıların arka planda konum erişimi verme şeklini değiştirir. Bu güncellemeler, Android 11 ve sonraki sürümlerde çalışan tüm uygulamaları etkiler.
Tek seferlik erişim
1. şekil. Ön planda konum izni için sistem iletişim kutusunda Yalnızca bu sefer adlı bir seçenek bulunur.
Android 11 ve sonraki sürümlerde, uygulamanız ön plan konumuna erişim istediğinde sistem izinleri iletişim kutusunda Yalnızca bu sefer adlı bir seçenek bulunur (Şekil 1'de gösterildiği gibi). Bu seçenek, kullanıcılara bir uygulamanın konum bilgilerine ne zaman erişebileceği konusunda daha fazla kontrol olanağı sunar.
Android 11, uygulamanızdaki bir özelliğin arka plan konumuna erişme şeklini değiştiriyor. Bu bölümde, bu değişikliklerin her biri açıklanmaktadır.
Uygulamanızdaki bir özellik arka planda konum bilgisine erişiyorsa bu erişimin gerekli olduğunu doğrulayın. Özelliğin ihtiyaç duyduğu bilgileri, Arka planda konuma erişme sayfasında açıklandığı gibi başka yollarla almayı deneyin.
Arka planda konum iznini ayrı olarak isteme
Çalışma zamanında konum erişimi isteme ile ilgili kılavuzda açıklandığı gibi, konum isteklerini artımlı olarak yapmanız gerekir. Uygulamanız Android 11 veya sonraki sürümleri hedefliyorsa sistem bu en iyi uygulamayı zorunlu kılar. Ön planda konum izni ve arka planda konum izni aynı anda istenirse sistem isteği yoksayar ve uygulamanıza izin vermez.
İzin iletişim kutusu değişiklikleri
Ayrıntıları değiştirme
Adı Değiştir: BACKGROUND_RATIONALE_CHANGE_ID
Değişiklik kimliği: 147316723
Nasıl açılır/kapatılır?
Uygulamanızın Android 11 ile uyumluluğunu test ederken aşağıdaki ADB komutlarını kullanarak bu değişikliği etkinleştirebilir veya devre dışı bırakabilirsiniz:
adb shell am compat enable (147316723|BACKGROUND_RATIONALE_CHANGE_ID) PACKAGE_NAMEadb shell am compat disable (147316723|BACKGROUND_RATIONALE_CHANGE_ID) PACKAGE_NAME
Uygulamanızdaki bir özellik, Android 11 veya sonraki sürümlerin yüklü olduğu bir cihazda arka planda konum erişimi istediğinde sistem iletişim kutusunda arka planda konum erişimini etkinleştirecek bir düğme bulunmaz. Arka planda konum erişimini etkinleştirmek için kullanıcıların, Arka planda konum izni isteme ile ilgili rehberde açıklandığı gibi, uygulamanızın konum izni için bir ayarlar sayfasında Her zaman izin ver seçeneğini belirlemesi gerekir.
Ek kaynaklar
Arka planda konuma erişim hakkında daha fazla bilgi için aşağıdaki materyallere göz atın:
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-08-27 UTC."],[],[],null,["To further protect user privacy, Android 11 adds one-time\nlocation access and changes how users grant background location access. These\nupdates affect all apps that run on Android 11 and higher.\n\nOne-time access \n**Figure 1.** System dialog for the foreground location permission includes an option called **Only this time**.\n\nOn Android 11 and higher, whenever your app requests access to\n[foreground location](/training/location/permissions#foreground), the system\npermissions dialog includes an option called **Only this time**, as shown in\nfigure 1. This option give users more control over when an app can access\nlocation information.\n\nLearn more about how the system handles [one-time\npermissions](/guide/topics/permissions/overview#one-time).\n\nBackground location access\n\nAndroid 11 changes how a feature in your app can gain access to\n[background location](/training/location/permissions#background). This section\ndescribes each of these changes.\n\nIf a feature in your app accesses location from the background, verify that such\naccess is necessary. Consider getting the information that the feature needs in\nother ways, as described on the page about how to [access\nlocation in the background](/training/location/background).\n\nRequest background location separately\n\nAs described in the guide on how to [request location access at\nruntime](/training/location/permissions#request-location-access-runtime), you\nshould perform incremental location requests. If your app targets\nAndroid 11 or higher, the system enforces this best practice. If\nyou request a foreground location permission and the background location\npermission at the same time, the system ignores the request and doesn't grant\nyour app either permission.\n\nPermission dialog changes \n\nChange details\n\n**Change Name** : `BACKGROUND_RATIONALE_CHANGE_ID`\n\n**Change ID** : `147316723`\n\nHow to toggle\n\nAs you test your app's compatibility with Android 11, you can toggle this change on or off\nusing the following ADB commands: \n\n adb shell am compat enable (\u003cvar translate=\"no\"\u003e147316723\u003c/var\u003e|\u003cvar translate=\"no\"\u003eBACKGROUND_RATIONALE_CHANGE_ID\u003c/var\u003e) \u003cvar translate=\"no\"\u003ePACKAGE_NAME\u003c/var\u003e\n adb shell am compat disable (\u003cvar translate=\"no\"\u003e147316723\u003c/var\u003e|\u003cvar translate=\"no\"\u003eBACKGROUND_RATIONALE_CHANGE_ID\u003c/var\u003e) \u003cvar translate=\"no\"\u003ePACKAGE_NAME\u003c/var\u003e\n\nFor more information about the compatibility framework and toggling changes, see\n[Test and debug platform behavior changes in\nyour app](/guide/app-compatibility/test-debug).\n\nWhen a feature in your app requests background location on a device that runs\nAndroid 11 or higher, the system dialog doesn't include a button\nto enable background location access. In order to enable background location\naccess, users must set the **Allow all the time** option for your app's location\npermission on a settings page, as described in the guide on how to [Request\nbackground location](/training/location/permissions#request-background-location).\n\nAdditional resources\n\nFor more information about accessing background location, view the following\nmaterials:\n\nVideos\n\n- [How to find possible background location\n usage](https://www.youtube.com/watch?v=xTVeFJZQ28c)"]]