- söz dizimi:
<permission android:description="string resource" android:icon="drawable resource" android:label="string resource" android:name="string" android:permissionGroup="string" android:protectionLevel=["normal" | "dangerous" | "signature" | ...] />
- bulunduğu yer:
<manifest>
- description:
- Aşağıdaki işlemlerde kullanılan güvenlik iznini beyan eder: bu uygulamanın veya diğer uygulamaların belirli bileşenlerine veya özelliklerine erişimi sınırlandırın. İzinlerin işleyiş şekli hakkında daha fazla bilgi için uygulama manifesti genel bakış sayfasındaki İzinler bölümüne ve Güvenlik ipuçları'na göz atın.
- özellikler:
android:description
- Daha uzun ve daha uzun bir iznin kullanıcı tarafından okunabilen açıklaması
daha fazla bilgi içeriyor. Bu, örneğin
kullanıcıdan izin alması gerektiğinde
başka bir uygulamaya erişim izni verebilirsiniz.
Bu özellik, bir dize kaynağına referans olarak ayarlanır.
label
özelliğinden farklı olarak, işlenmemiş bir dize olamaz. android:icon
- Sayfanın çekilebilir kaynağını temsil eden izni gerekir.
android:label
- İzin için kullanıcı tarafından okunabilir bir ad.
Kolaylık sağlamak için etiket doğrudan ayarlanabilir siz uygulamayı geliştirirken ham dize olarak kullanabilirsiniz. Ancak, uygulama yayınlanmaya hazır olduğunda, diğer öğeler gibi yerelleştirilebilmesi için bir dize kaynağına referans verir. dizeler halinde çalışır.
android:name
- Kullanılacak ad
kodu kullanabilirsiniz (örneğin,
<uses-permission>
öğesi veya Uygulama bileşenlerininpermission
özellikleri.Not: Sistem, birden fazla paketin bildirim göndermesine izin vermez. tüm paketlerin hepsi aynı sertifikaya sahip olursunuz. Bir paket izin beyan ederse sistem aynı izin adına sahip diğer paketleri yüklemesini bu paketler ilk paketle aynı sertifikayla imzalanır.
Bu nedenle Google, izinlerin başına uygulama paketinin adını eklemenizi önerir. gibi bir ad verebilirsiniz. Bu ön eki
.permission.
ile ve ardından iznin üst SNAKE_CASE içinde temsil ettiği özellik. Örnek:com.example.myapp.permission.ENGAGE_HYPERSPACE
Bu önerinin uygulanması, adlandırma çakışmalarını önler ve sahibi net bir şekilde tanımlamaya yardımcı olur ve özel iznin amacı.
android:permissionGroup
- Bu izni bir gruba atar. Bu özelliğin değeri:
grubun adı;
Bu öğede
<permission-group>
öğe veya başka bir uygulama. Bu özellik ayarlanmazsa bir gruba ait değil. android:protectionLevel
-
İzinde belirtilen potansiyel riski nitelendirir ve bir karar verirken izlemesi gereken prosedürü de ve izin isteyen bir uygulamaya izin verilip verilmeyeceğini belirler.
Her koruma seviyesi, bir temel izin türü ile sıfır veya daha fazla izinden oluşur işaretidir. Örneğin,
"dangerous"
koruma seviyesinde işaretidir. Buna karşılık"signature|privileged"
koruma düzeyi"signature"
temel izin türünün ve"privileged"
işareti.Aşağıdaki tabloda tüm temel izin türleri gösterilmektedir. İşaretlerin listesi için bkz.
protectionLevel
Değer Anlamı "normal"
Varsayılan değerdir. İstekte bulunma izni veren düşük riskli bir izin uygulamaların, kullanıcı izni ve standart uygulama düzeyinde uygulama, sistem veya kullanıcı için asgari riskin bulunduğunu ifade eder. Sistem bu türü otomatik olarak verir istekte bulunan uygulama için yalnızca gerekli izinleri kullanıcının açık onayını istemesine rağmen kullanıcı her zaman adlı uygulama, yüklemeden önce bu izinleri inceleyebilir. "dangerous"
İstekte bulunan uygulamaya izin veren daha yüksek riskli bir izin gizli kullanıcı verilerine erişme veya cihaz üzerinde kontrol sahibi olma, etkilemesine yardımcı olur. Çünkü bu tür bir izin ortaya çıkarsa sistem, kurumsal kültürü istekte bulunan uygulamaya erişim izni verebilir. Örneğin, tehlikeli olabilecek uygulama tarafından istenen izinler ekranda görüntülenebilir ve devam etmeden önce onay gerektiriyor veya başka bir işlem kullanıcının otomatik olarak yeniden kullanımıdır. "signature"
Sistemin, yalnızca istekte bulunan uygulama, uygulamayla aynı sertifikayla imzalanmış olmalıdır. e-posta adresini Google'a gönderin. Sertifikalar eşleşirse sistem, kullanıcıya bildirimde bulunmadan otomatik olarak izin verdiğinden kullanıcının açık onayını istemelidir. "knownSigner"
Sistemin, yalnızca istekte bulunan başvuru şununla imzalandı: izin verilen sertifikası hakkında daha fazla bilgi edinin. İstekte bulunanın sertifikası listede varsa sistem, kullanıcıya bildirimde bulunmadan otomatik olarak izin verdiğinden kullanıcının açık onayını istemelidir. "signatureOrSystem"
"signature|privileged"
için eski eş anlamlı. API'de desteği sonlandırıldı 23. seviye.Sistemin yalnızca şu özelliğe sahip uygulamalara verdiği bir izin: Android sistem görüntüsünde özel bir klasörde veya beyan eden uygulamayla aynı sertifika ile imzalanmış olmalıdır. izni gerekir.
"signature"
gibi bu seçeneği kullanmaktan kaçının çoğu ihtiyaç için yeterli bir koruma seviyesidir. nerede yüklü olduğunu öğreneceğiz.İlgili içeriği oluşturmak için kullanılan Belirli özel etkinlikler için
"signatureOrSystem"
izni kullanılıyor Birden fazla satıcının sistemde yerleşik uygulamalar bulunduğu durumlar ve belirli özellikleri açık bir şekilde paylaşmanız gerekir çünkü bu gerçeği göz önünde bulundurur.
- tanıtıldığı yer:
- API düzeyi 1
- ayrıca bkz.:
<uses-permission>
<permission-tree>
<permission-group>
<izin>
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-07-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-07-27 UTC."],[],[],null,["# <permission\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cpermission android:description=\"string resource\"\n android:icon=\"drawable resource\"\n android:label=\"string resource\"\n android:name=\"string\"\n android:permissionGroup=\"string\"\n android:protectionLevel=[\"normal\" | \"dangerous\" |\n \"signature\" | ...] /\u003e\n ```\n\ncontained in:\n: [\u003cmanifest\u003e](/guide/topics/manifest/manifest-element)\n\ndescription:\n: Declares a security permission used to\n limit access to specific components or features of this or other applications.\n For more information about how permissions work, see the [Permissions](/guide/topics/manifest/manifest-intro#perms) section in the app manifest overview and [Security tips](/guide/topics/security/security).\n\nattributes:\n:\n\n `android:description`\n\n : A user-readable description of the permission that is longer and more informative than the label. It might display, for example, to explain the permission to the user when the user is asked to grant the permission to another application.\u003cbr /\u003e\n\n\n This attribute is set as a reference to a string resource.\n Unlike the `label` attribute, it can't be a raw string.\n\n `android:icon`\n : A reference to a drawable resource for an icon that represents the\n permission.\n\n `android:label`\n\n : A user-readable name for the permission.\u003cbr /\u003e\n\n\n As a convenience, the label can be directly set\n as a raw string while you're developing the application. However,\n when the application is ready to publish, set it as a\n reference to a string resource, so that it can be localized like other\n strings in the user interface.\n\n `android:name`\n : The name to be used in\n code to refer to the permission, such as in a\n [\u003cuses-permission\u003e](/guide/topics/manifest/uses-permission-element) element or the\n `permission` attributes of application components.\n\n\n **Note:** The system doesn't let multiple packages declare\n a permission with the same name unless all the packages are signed with the\n same certificate. If a package declares a permission, the system doesn't permit\n the user to install other packages with the same permission name, unless\n those packages are signed with the same certificate as the first package.\n\n For this reason, Google recommends prefixing permissions with the app's package name,\n using reverse-domain-style naming.\n Follow this prefix with `.permission.` and then a description of the\n capability that the permission represents in upper SNAKE_CASE. For example:\n `com.example.myapp.permission.ENGAGE_HYPERSPACE`.\n\n Following this recommendation avoids naming collisions and helps clearly identify the owner\n and intention of a custom permission.\n\n `android:permissionGroup`\n : Assigns this permission to a group. The value of this attribute is\n the name of the group, which is declared with the\n [\u003cpermission-group\u003e](/guide/topics/manifest/permission-group-element) element in this\n or another application. If this attribute isn't set, the permission\n doesn't belong to a group.\n\n `android:protectionLevel`\n\n :\n Characterizes the potential risk implied in the permission and\n indicates the procedure for the system to follow when determining\n whether to grant the permission to an application requesting it.\n\n\n Each protection level consists of a base permission type and zero or more\n flags. For example, the `\"dangerous\"` protection level has no\n flags. In contrast, the protection level `\"signature|privileged\"`\n is a combination of the `\"signature\"` base permission type and the\n `\"privileged\"` flag.\n\n\n The following table shows all base permission types. For a list of flags, see\n [protectionLevel](/reference/android/R.attr#protectionLevel).\n\n | Value | Meaning |\n |-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | `\"normal\"` | The default value. A lower-risk permission that gives requesting applications access to isolated application-level features with minimal risk to other applications, the system, or the user. The system automatically grants this type of permission to a requesting application at installation, without asking for the user's explicit approval, though the user always has the option to review these permissions before installing. |\n | `\"dangerous\"` | A higher-risk permission that gives a requesting application access to private user data or control over the device that can negatively impact the user. Because this type of permission introduces potential risk, the system might not automatically grant it to the requesting application. For example, any dangerous permissions requested by an application might be displayed to the user and require confirmation before proceeding, or some other approach might be taken to avoid the user automatically granting the use of such facilities. |\n | `\"signature\"` | A permission that the system grants only if the requesting application is signed with the same certificate as the application that declared the permission. If the certificates match, the system automatically grants the permission without notifying the user or asking for the user's explicit approval. |\n | `\"knownSigner\"` | A permission that the system grants only if the requesting application is signed with [an allowed certificate](/guide/topics/permissions/defining#grant-signature-permissions). If the requester's certificate is listed, the system automatically grants the permission without notifying the user or asking for the user's explicit approval. |\n | `\"signatureOrSystem\"` | *Old synonym for `\"signature|privileged\"`. Deprecated in API level 23.* A permission that the system grants only to applications that are in a dedicated folder on the Android system image *or* that are signed with the same certificate as the application that declared the permission. Avoid using this option, as the `\"signature\"` protection level is sufficient for most needs and works regardless of where apps are installed. The `\"signatureOrSystem\"` permission is used for certain special situations where multiple vendors have applications built into a system image and need to share specific features explicitly because they are being built together. |\n\nintroduced in:\n: API level 1\n\nsee also:\n: [\u003cuses-permission\u003e](/guide/topics/manifest/uses-permission-element)\n\n [\u003cpermission-tree\u003e](/guide/topics/manifest/permission-tree-element)\n\n [\u003cpermission-group\u003e](/guide/topics/manifest/permission-group-element)"]]