- সিনট্যাক্স:
<permission-tree android:icon="drawable resource" android:label="string resource" android:name="string" />
- এর মধ্যে রয়েছে:
-
<manifest>
- বর্ণনা:
- অনুমতির একটি গাছের ভিত্তি নাম ঘোষণা করে। অ্যাপ্লিকেশনটি গাছের মধ্যে থাকা সমস্ত নামের মালিকানা নেয়। এটি
PackageManager.addPermission()
কল করে গতিশীলভাবে গাছে নতুন অনুমতি যোগ করতে পারে। গাছের মধ্যে নামগুলি পিরিয়ড ('.
') দ্বারা পৃথক করা হয়। উদাহরণস্বরূপ, যদি মূল নামটি হয়com.example.project.taxes
, তাহলে নিম্নলিখিতগুলির মতো অনুমতি যোগ করা যেতে পারে:com.example.project.taxes.CALCULATE
com.example.project.taxes.deductions.STORE_RECEIPTS
com.example.project.taxes.deductions.ACCESS_RECORDS
এই উপাদানটি নিজেই একটি অনুমতি ঘোষণা করে না, শুধুমাত্র একটি নামস্থান যেখানে অনুমতিগুলি স্থাপন করা যেতে পারে। অনুমতি ঘোষণা সম্পর্কে আরও তথ্যের জন্য,
<permission>
উপাদানটি দেখুন। - গুণাবলী:
-
android:icon
- গাছের সমস্ত অনুমতির প্রতিনিধিত্বকারী একটি আইকন৷ এই বৈশিষ্ট্যটি অবশ্যই চিত্র সংজ্ঞা ধারণকারী একটি অঙ্কনযোগ্য সম্পদের একটি রেফারেন্স হিসাবে সেট করা আবশ্যক।
-
android:label
- গ্রুপের জন্য একটি ব্যবহারকারী-পাঠযোগ্য নাম। একটি সুবিধা হিসাবে, বিকাশের সময় লেবেলটি সরাসরি একটি কাঁচা স্ট্রিং হিসাবে সেট করা যেতে পারে। যাইহোক, যখন অ্যাপ্লিকেশনটি প্রকাশের জন্য প্রস্তুত হয়, তখন এটিকে একটি স্ট্রিং রিসোর্সের রেফারেন্স হিসাবে সেট করুন, যাতে এটি ব্যবহারকারীর ইন্টারফেসের অন্যান্য স্ট্রিংগুলির মতো স্থানীয়করণ করা যায়।
-
android:name
- অনুমতি গাছের গোড়ায় নাম। এটি গাছের সমস্ত অনুমতি নামের উপসর্গ হিসাবে কাজ করে। জাভা-স্টাইল স্কোপিং ব্যবহার করুন যাতে নামটি অনন্য হয়। নামটির পাথে দুইটির বেশি পিরিয়ড-বিভক্ত সেগমেন্ট থাকতে হবে। উদাহরণস্বরূপ,
com.example.base
ঠিক আছে, কিন্তুcom.example
নয়।
-
- প্রবর্তিত:
- API স্তর 1
- এছাড়াও দেখুন:
-
<permission>
<permission-group>
<uses-permission>
<অনুমতি-বৃক্ষ>
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি 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-tree\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cpermission-tree android:icon=\"drawable resource\"\n android:label=\"string resource\"\n android:name=\"string\" /\u003e\n ```\n\ncontained in:\n: [\u003cmanifest\u003e](/guide/topics/manifest/manifest-element)\n\ndescription:\n: Declares the base name for a tree of permissions. The application takes\n ownership of all names within the tree. It can dynamically add new permissions\n to the tree by calling [PackageManager.addPermission()](/reference/android/content/pm/PackageManager#addPermission(android.content.pm.PermissionInfo)).\n Names within the tree are separated by\n periods ('`.`'). For example, if the base name is\n `com.example.project.taxes`, permissions like the following might be\n added:\n\n `com.example.project.taxes.CALCULATE`\n\n `com.example.project.taxes.deductions.STORE_RECEIPTS`\n\n `com.example.project.taxes.deductions.ACCESS_RECORDS`\n\n\n This element doesn't declare a permission itself, only a\n namespace in which permissions can be placed. For more information about declaring permissions, see the\n [\u003cpermission\u003e](/guide/topics/manifest/permission-element)\n element.\n\nattributes:\n:\n\n `android:icon`\n : An icon representing all the permissions in the tree. This attribute\n must be set as a reference to a drawable resource containing the image\n definition.\n\n `android:label`\n : A user-readable name for the group. As a convenience, the label\n can be directly set as a raw string during development. However,\n when the application is ready to be published, 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 at the base of the permission tree. It serves as\n a prefix to all permission names in the tree. Use Java-style scoping\n so that the name is unique. The name must have more than\n two period-separated segments in its path. For example,\n `com.example.base` is OK, but `com.example` isn't.\n\nintroduced in:\n: API level 1\n\nsee also:\n: [\u003cpermission\u003e](/guide/topics/manifest/permission-element)\n\n [\u003cpermission-group\u003e](/guide/topics/manifest/permission-group-element)\n\n [\u003cuses-permission\u003e](/guide/topics/manifest/uses-permission-element)"]]