- সিনট্যাক্স:
<permission android:description="string resource" android:icon="drawable resource" android:label="string resource" android:name="string" android:permissionGroup="string" android:protectionLevel=["normal" | "dangerous" | "signature" | ...] />
- এর মধ্যে রয়েছে:
-
<manifest>
- বর্ণনা:
- এই বা অন্যান্য অ্যাপ্লিকেশনগুলির নির্দিষ্ট উপাদান বা বৈশিষ্ট্যগুলিতে অ্যাক্সেস সীমিত করতে ব্যবহৃত একটি সুরক্ষা অনুমতি ঘোষণা করে৷ অনুমতিগুলি কীভাবে কাজ করে সে সম্পর্কে আরও তথ্যের জন্য, অ্যাপ ম্যানিফেস্ট ওভারভিউ এবং নিরাপত্তা টিপসের অনুমতি বিভাগটি দেখুন।
- গুণাবলী:
-
android:description
- অনুমতির একটি ব্যবহারকারী-পাঠযোগ্য বিবরণ যা লেবেলের চেয়ে দীর্ঘ এবং আরও তথ্যপূর্ণ। এটি প্রদর্শন করতে পারে, উদাহরণস্বরূপ, ব্যবহারকারীকে অনুমতি ব্যাখ্যা করার জন্য যখন ব্যবহারকারীকে অন্য অ্যাপ্লিকেশনের অনুমতি দিতে বলা হয়।
এই বৈশিষ্ট্য একটি স্ট্রিং সম্পদ একটি রেফারেন্স হিসাবে সেট করা হয়.
label
বৈশিষ্ট্যের বিপরীতে, এটি একটি কাঁচা স্ট্রিং হতে পারে না। -
android:icon
- অনুমতির প্রতিনিধিত্ব করে এমন একটি আইকনের জন্য একটি অঙ্কনযোগ্য সংস্থানের একটি রেফারেন্স।
-
android:label
- অনুমতির জন্য একটি ব্যবহারকারী-পাঠযোগ্য নাম।
একটি সুবিধা হিসাবে, আপনি অ্যাপ্লিকেশনটি বিকাশ করার সময় লেবেলটি সরাসরি একটি কাঁচা স্ট্রিং হিসাবে সেট করা যেতে পারে। যাইহোক, যখন অ্যাপ্লিকেশনটি প্রকাশের জন্য প্রস্তুত হয়, তখন এটিকে একটি স্ট্রিং রিসোর্সের রেফারেন্স হিসাবে সেট করুন, যাতে এটি ব্যবহারকারীর ইন্টারফেসের অন্যান্য স্ট্রিংগুলির মতো স্থানীয়করণ করা যায়।
-
android:name
- অনুমতির উল্লেখ করার জন্য কোডে যে নাম ব্যবহার করা হবে, যেমন একটি
<uses-permission>
উপাদান বা অ্যাপ্লিকেশন উপাদানগুলিরpermission
বৈশিষ্ট্যে।দ্রষ্টব্য: সমস্ত প্যাকেজ একই শংসাপত্রের সাথে স্বাক্ষরিত না হলে সিস্টেমটি একাধিক প্যাকেজকে একই নামের সাথে একটি অনুমতি ঘোষণা করতে দেয় না। যদি একটি প্যাকেজ একটি অনুমতি ঘোষণা করে, তবে সিস্টেম ব্যবহারকারীকে একই অনুমতি নামের অন্য প্যাকেজগুলি ইনস্টল করার অনুমতি দেয় না, যদি না সেই প্যাকেজগুলি প্রথম প্যাকেজের মতো একই শংসাপত্রের সাথে স্বাক্ষরিত হয়।
এই কারণে, গুগল রিভার্স-ডোমেন-স্টাইল নামকরণ ব্যবহার করে অ্যাপের প্যাকেজ নামের সাথে অনুমতির উপসর্গ যুক্ত করার সুপারিশ করে।
.permission.
এবং তারপর ক্ষমতার একটি বিবরণ যা অনুমতি উপরের SNAKE_CASE-এ প্রতিনিধিত্ব করে। যেমন:com.example.myapp.permission.ENGAGE_HYPERSPACE
।এই সুপারিশ অনুসরণ করলে নামকরণের সংঘর্ষ এড়ানো যায় এবং কাস্টম অনুমতির মালিক ও উদ্দেশ্যকে স্পষ্টভাবে সনাক্ত করতে সাহায্য করে।
-
android:permissionGroup
- একটি গ্রুপে এই অনুমতি বরাদ্দ করে৷ এই অ্যাট্রিবিউটের মান হল গ্রুপের নাম, যা এই বা অন্য অ্যাপ্লিকেশনে
<permission-group>
উপাদান দিয়ে ঘোষণা করা হয়। যদি এই অ্যাট্রিবিউট সেট করা না থাকে, তাহলে অনুমতি কোনো গ্রুপের অন্তর্ভুক্ত নয়। -
android:protectionLevel
অনুমতিতে অন্তর্নিহিত সম্ভাব্য ঝুঁকি চিহ্নিত করে এবং অনুরোধ করা একটি আবেদনকে অনুমতি দেওয়া হবে কিনা তা নির্ধারণ করার সময় সিস্টেমের অনুসরণ করার পদ্ধতি নির্দেশ করে।
প্রতিটি সুরক্ষা স্তরে একটি বেস অনুমতি প্রকার এবং শূন্য বা তার বেশি পতাকা থাকে। উদাহরণস্বরূপ,
"dangerous"
সুরক্ষা স্তরে কোনও পতাকা নেই৷ বিপরীতে, সুরক্ষা স্তর"signature|privileged"
হল"signature"
বেস অনুমতি প্রকার এবং"privileged"
পতাকার সংমিশ্রণ।নিম্নলিখিত সারণী সমস্ত বেস অনুমতি প্রকার দেখায়. পতাকার তালিকার জন্য,
protectionLevel
দেখুন।মান অর্থ "normal"
ডিফল্ট মান। একটি নিম্ন-ঝুঁকির অনুমতি যা অনুরোধকারী অ্যাপ্লিকেশনগুলিকে অন্যান্য অ্যাপ্লিকেশন, সিস্টেম বা ব্যবহারকারীর জন্য ন্যূনতম ঝুঁকি সহ বিচ্ছিন্ন অ্যাপ্লিকেশন-স্তরের বৈশিষ্ট্যগুলিতে অ্যাক্সেস দেয়। সিস্টেম স্বয়ংক্রিয়ভাবে ইনস্টলেশনের সময় একটি অনুরোধকারী অ্যাপ্লিকেশনকে এই ধরনের অনুমতি দেয়, ব্যবহারকারীর সুস্পষ্ট অনুমোদনের জন্য জিজ্ঞাসা না করে, যদিও ব্যবহারকারীর সবসময় ইনস্টল করার আগে এই অনুমতিগুলি পর্যালোচনা করার বিকল্প থাকে। "dangerous"
একটি উচ্চ-ঝুঁকির অনুমতি যা একটি অনুরোধকারী অ্যাপ্লিকেশনকে ব্যক্তিগত ব্যবহারকারীর ডেটা বা ডিভাইসের নিয়ন্ত্রণে অ্যাক্সেস দেয় যা ব্যবহারকারীকে নেতিবাচকভাবে প্রভাবিত করতে পারে। কারণ এই ধরনের অনুমতি সম্ভাব্য ঝুঁকির পরিচয় দেয়, সিস্টেম স্বয়ংক্রিয়ভাবে অনুরোধকারী অ্যাপ্লিকেশনে এটি মঞ্জুর নাও করতে পারে। উদাহরণস্বরূপ, একটি অ্যাপ্লিকেশন দ্বারা অনুরোধ করা কোনো বিপজ্জনক অনুমতি ব্যবহারকারীর কাছে প্রদর্শিত হতে পারে এবং এগিয়ে যাওয়ার আগে নিশ্চিতকরণের প্রয়োজন হতে পারে, অথবা ব্যবহারকারীকে স্বয়ংক্রিয়ভাবে এই ধরনের সুবিধার ব্যবহার মঞ্জুর করার জন্য অন্য কোনো পদ্ধতি গ্রহণ করা হতে পারে। "signature"
একটি অনুমতি যা সিস্টেম শুধুমাত্র তখনই মঞ্জুর করে যখন অনুরোধকারী আবেদনটি অনুমতি ঘোষণাকারী অ্যাপ্লিকেশনটির মতো একই শংসাপত্রের সাথে স্বাক্ষরিত হয়। সার্টিফিকেট মেলে, সিস্টেম স্বয়ংক্রিয়ভাবে ব্যবহারকারীকে অবহিত না করে বা ব্যবহারকারীর সুস্পষ্ট অনুমোদনের জন্য অনুরোধ না করেই অনুমতি দেয়। "knownSigner"
একটি অনুমতি যা সিস্টেম শুধুমাত্র তখনই দেয় যখন অনুরোধকারী আবেদনটি একটি অনুমোদিত শংসাপত্রের সাথে স্বাক্ষরিত হয়৷ অনুরোধকারীর শংসাপত্র তালিকাভুক্ত হলে, সিস্টেম স্বয়ংক্রিয়ভাবে ব্যবহারকারীকে অবহিত না করে বা ব্যবহারকারীর সুস্পষ্ট অনুমোদনের জন্য অনুরোধ না করেই অনুমতি দেয়। "signatureOrSystem"
"signature|privileged"
এর পুরানো প্রতিশব্দ। এপিআই লেভেল 23-এ অপ্রচলিত।একটি অনুমতি যা সিস্টেম শুধুমাত্র সেই অ্যাপ্লিকেশনগুলিকে মঞ্জুর করে যেগুলি অ্যান্ড্রয়েড সিস্টেম ইমেজের একটি ডেডিকেটেড ফোল্ডারে রয়েছে বা যেগুলি অনুমতি ঘোষণা করেছে সেই অ্যাপ্লিকেশনটির মতো একই শংসাপত্রের সাথে স্বাক্ষরিত৷ এই বিকল্পটি ব্যবহার করা এড়িয়ে চলুন, কারণ
"signature"
সুরক্ষা স্তর বেশিরভাগ প্রয়োজনের জন্য যথেষ্ট এবং অ্যাপগুলি যেখানেই ইনস্টল করা হোক না কেন কাজ করে৷"signatureOrSystem"
অনুমতিটি নির্দিষ্ট বিশেষ পরিস্থিতির জন্য ব্যবহৃত হয় যেখানে একাধিক বিক্রেতাদের একটি সিস্টেম ইমেজে তৈরি অ্যাপ্লিকেশন রয়েছে এবং তাদের নির্দিষ্ট বৈশিষ্ট্যগুলি স্পষ্টভাবে ভাগ করতে হবে কারণ সেগুলি একসাথে তৈরি করা হচ্ছে৷
-
- প্রবর্তিত:
- API স্তর 1
- এছাড়াও দেখুন:
-
<uses-permission>
<permission-tree>
<permission-group>
<অনুমতি>
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 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-29 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)"]]