- সিনট্যাক্স:
<activity-alias android:enabled=["true" | "false"] android:exported=["true" | "false"] android:icon="drawable resource" android:label="string resource" android:name="string" android:permission="string" android:targetActivity="string" > ... </activity-alias>
- এর মধ্যে রয়েছে:
-
<application>
- থাকতে পারে:
-
<intent-filter>
<meta-data>
- বর্ণনা:
-
targetActivity
অ্যাট্রিবিউট দ্বারা নামকরণ করা একটি অ্যাক্টিভিটির একটি উপনাম। লক্ষ্যটি অবশ্যই উপনামের মতো একই অ্যাপ্লিকেশনে থাকতে হবে এবং ম্যানিফেস্টে উপনামের আগে ঘোষণা করতে হবে।উপনাম টার্গেট অ্যাক্টিভিটিকে একটি স্বাধীন সত্তা হিসেবে উপস্থাপন করে এবং এর নিজস্ব ইনটেন্ট ফিল্টার থাকতে পারে। তারা, লক্ষ্য ক্রিয়াকলাপের উদ্দেশ্য ফিল্টারগুলির পরিবর্তে, কোন অভিপ্রায়গুলি উপনামের মাধ্যমে লক্ষ্যটিকে সক্রিয় করতে পারে এবং সিস্টেমটি কীভাবে উপনামের সাথে আচরণ করে তা নির্ধারণ করে।
উদাহরণস্বরূপ, উপনামের অভিপ্রায় ফিল্টারগুলি
"android.intent.action.MAIN"
এবং"android.intent.category.LAUNCHER"
" ফ্ল্যাগগুলি নির্দিষ্ট করতে পারে, যার ফলে এটি অ্যাপ্লিকেশন লঞ্চারে উপস্থাপন করা হয়, যদিও কোনোটি ফিল্টার নয় লক্ষ্য কার্যকলাপ নিজেই এই পতাকা সেট.targetActivity
বাদ দিয়ে,<activity-alias>
বৈশিষ্ট্যগুলি হল<activity>
বৈশিষ্ট্যগুলির একটি উপসেট। উপসেটের বৈশিষ্ট্যগুলির জন্য, লক্ষ্যের জন্য সেট করা মানগুলির একটিও উপনামে বহন করে না। যাইহোক, উপসেটে নয় এমন বৈশিষ্ট্যগুলির জন্য, লক্ষ্য কার্যকলাপের জন্য সেট করা মানগুলিও উপনামের ক্ষেত্রে প্রযোজ্য। - গুণাবলী:
-
android:enabled
- এই উপনামের মাধ্যমে সিস্টেম দ্বারা টার্গেট অ্যাক্টিভিটি ইনস্ট্যান্ট করা যায় কিনা।
"true"
যদি এটি হতে পারে, এবং যদি না হয়"false"
। ডিফল্ট মান হল"true"
।<application>
উপাদানটির নিজস্বenabled
বৈশিষ্ট্য রয়েছে যা কার্যকলাপ উপনাম সহ সমস্ত অ্যাপ্লিকেশন উপাদানগুলিতে প্রযোজ্য।<application>
এবং<activity-alias>
বৈশিষ্ট্য উভয়ই"true"
হতে হবে যাতে সিস্টেমটি উপনামের মাধ্যমে লক্ষ্য ক্রিয়াকলাপকে সূচনা করতে সক্ষম হয়। যদি হয়"false"
, উপনাম কাজ করে না। -
android:exported
- অন্যান্য অ্যাপ্লিকেশনের উপাদানগুলি এই উপনামের মাধ্যমে লক্ষ্য কার্যকলাপ চালু করতে পারে কিনা।
"true"
যদি তারা পারে, এবং যদি না পারে"false"
। যদি"false"
, টার্গেট অ্যাক্টিভিটি শুধুমাত্র উপনামের মাধ্যমে লঞ্চ করা যেতে পারে একই অ্যাপ্লিকেশানের উপনাম বা একই ব্যবহারকারী আইডি সহ অ্যাপ্লিকেশানগুলির উপাদানগুলির দ্বারা।ডিফল্ট মান নির্ভর করে উপনামে অভিপ্রায় ফিল্টার আছে কিনা। কোনো ফিল্টারের অনুপস্থিতির মানে হল যে ক্রিয়াকলাপটি শুধুমাত্র উপনামের সঠিক নাম উল্লেখ করে উপনামের মাধ্যমে আহ্বান করা যেতে পারে। এটি বোঝায় যে উপনামটি শুধুমাত্র অ্যাপ্লিকেশন-অভ্যন্তরীণ ব্যবহারের জন্য তৈরি করা হয়েছে, যেহেতু অন্যরা এর নাম জানে না৷ সুতরাং, ডিফল্ট মান হল
"false"
। অন্যদিকে, অন্তত একটি ফিল্টারের উপস্থিতি বোঝায় যে উপনামটি বাহ্যিক ব্যবহারের উদ্দেশ্যে করা হয়েছে, তাই ডিফল্ট মানটি"true"
। -
android:icon
- উপনামের মাধ্যমে ব্যবহারকারীদের কাছে উপস্থাপিত হলে লক্ষ্য কার্যকলাপের জন্য একটি আইকন। আরও তথ্যের জন্য,
<activity>
উপাদানেরicon
বৈশিষ্ট্য দেখুন। -
android:label
- উপনামের মাধ্যমে ব্যবহারকারীদের কাছে উপস্থাপিত হলে উপনামের জন্য একটি ব্যবহারকারী-পঠনযোগ্য লেবেল। আরও তথ্যের জন্য,
<activity>
উপাদানেরlabel
বৈশিষ্ট্য দেখুন। -
android:name
- উপনামের জন্য একটি অনন্য নাম। নামটি সম্পূর্ণ যোগ্য শ্রেণীর নামের অনুরূপ। কিন্তু, লক্ষ্য ক্রিয়াকলাপের নামের বিপরীতে, উপনামটি স্বেচ্ছাচারী। এটি একটি প্রকৃত শ্রেণীর উল্লেখ করে না।
-
android:permission
- একটি অনুমতির নাম যা ক্লায়েন্টদের অবশ্যই লক্ষ্য কার্যকলাপ চালু করতে হবে বা উপনাম ব্যবহার করে কিছু করতে হবে।
startActivity()
বাstartActivityForResult()
এর একজন কলারকে নির্দিষ্ট অনুমতি না দেওয়া হলে, টার্গেট অ্যাক্টিভিটি সক্রিয় করা হয় না।এই বৈশিষ্ট্যটি লক্ষ্য ক্রিয়াকলাপের জন্য যেকোন অনুমতি সেট করে। যদি এটি সেট করা না থাকে, তাহলে উপনামের মাধ্যমে লক্ষ্যটি সক্রিয় করার জন্য অনুমতির প্রয়োজন নেই।
অনুমতি সম্পর্কে আরও তথ্যের জন্য, অ্যাপ ম্যানিফেস্ট ওভারভিউতে অনুমতি বিভাগটি দেখুন।
-
android:targetActivity
- উপনামের মাধ্যমে সক্রিয় করা যেতে পারে এমন কার্যকলাপের নাম। এই নামটি অবশ্যই একটি
<activity>
উপাদানেরname
বৈশিষ্ট্যের সাথে মেলে যা ম্যানিফেস্টে উপনামের আগে থাকে।
-
- প্রবর্তিত:
- API স্তর 1
- এছাড়াও দেখুন:
-
<activity>
<activity-alias>
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# <activity-alias\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cactivity-alias android:enabled=[\"true\" | \"false\"]\n android:exported=[\"true\" | \"false\"]\n android:icon=\"drawable resource\"\n android:label=\"string resource\"\n android:name=\"string\"\n android:permission=\"string\"\n android:targetActivity=\"string\" \u003e\n ...\n \u003c/activity-alias\u003e\n ```\n\ncontained in:\n: [\u003capplication\u003e](/guide/topics/manifest/application-element)\n\ncan contain:\n: [\u003cintent-filter\u003e](/guide/topics/manifest/intent-filter-element)\n\n [\u003cmeta-data\u003e](/guide/topics/manifest/meta-data-element)\n\ndescription:\n: An alias for an activity, named by the `targetActivity`\n attribute. The target must be in the same application as the\n alias and declared before the alias in the manifest.\n\n\n The alias presents the target activity as an independent entity, and can have its own set of intent\n filters. They, rather than the\n intent filters on the target activity itself, determine which intents\n can activate the target through the alias and how the system\n treats the alias.\n\n For example, the intent filters on the alias might\n specify the [\"android.intent.action.MAIN\"](/reference/android/content/Intent#ACTION_MAIN)\n and [\"android.intent.category.LAUNCHER\"](/reference/android/content/Intent#CATEGORY_LAUNCHER)\" flags, causing it to\n be represented in the application launcher, even though none of the\n filters on the target activity itself set these flags.\n\n\n With the exception of `targetActivity`, `\u003cactivity-alias\u003e`\n attributes are a subset of [\u003cactivity\u003e](/guide/topics/manifest/activity-element) attributes.\n For attributes in the subset, none of the values set for the target carry over\n to the alias. However, for attributes not in the subset, the values set for\n the target activity also apply to the alias.\n\nattributes:\n:\n\n `android:enabled`\n : Whether the target activity can be instantiated by the system through\n this alias. `\"true\"` if it can be, and `\"false\"` if not.\n The default value is `\"true\"`.\n\n\n The [\u003capplication\u003e](/guide/topics/manifest/application-element) element has its own\n [enabled](/guide/topics/manifest/application-element#enabled) attribute that applies to all\n application components, including activity aliases. The\n `\u003capplication\u003e` and `\u003cactivity-alias\u003e`\n attributes must both be `\"true\"` for the system to be able to instantiate\n the target activity through the alias. If either is `\"false\"`, the alias\n doesn't work.\n\n `android:exported`\n : Whether the components of other applications can launch the target activity\n through this alias. `\"true\"` if they can, and `\"false\"` if not.\n If `\"false\"`, the target activity can be launched through the alias only by\n components of the same application as the alias or applications with the same user ID.\n\n\n The default value depends on whether the alias contains intent filters. The\n absence of any filters means that the activity can be invoked through the alias\n only by specifying the exact name of the alias. This implies that the alias\n is intended only for application-internal use, since others don't know its name.\n So, the default value is `\"false\"`.\n On the other hand, the presence of at least one filter implies that the alias\n is intended for external use, so the default value is `\"true\"`.\n\n `android:icon`\n : An icon for the target activity when presented to users through the alias.\n For more information, see the [\u003cactivity\u003e](/guide/topics/manifest/activity-element) element's\n [icon](/guide/topics/manifest/activity-element#icon) attribute.\n\n `android:label`\n : A user-readable label for the alias when presented to users through the alias.\n For more information, see the [\u003cactivity\u003e](/guide/topics/manifest/activity-element) element's\n [label](/guide/topics/manifest/activity-element#label) attribute.\n\n \u003cbr /\u003e\n\n `android:name`\n\n : A unique name for the alias. The name resembles a fully qualified class name. But, unlike the name of the target activity, the alias name is arbitrary. It doesn't refer to an actual class. \u003cbr /\u003e\n\n `android:permission`\n : The name of a permission that clients must have to launch the target activity\n or get it to do something using the alias. If a caller of\n [startActivity()](/reference/android/content/Context#startActivity(android.content.Intent)) or\n [startActivityForResult()](/reference/android/app/Activity#startActivityForResult(android.content.Intent, int))\n isn't granted the specified permission, the target activity isn't activated.\n\n This attribute supplants any permission set for the target activity itself. If\n it isn't set, a permission isn't needed to activate the target through the alias.\n\n\n For more information about permissions, see the\n [Permissions](/guide/topics/manifest/manifest-intro#perms)\n section in the app manifest overview.\n\n `android:targetActivity`\n : The name of the activity that can be activated through the alias.\n This name must match the `name` attribute of an\n [\u003cactivity\u003e](/guide/topics/manifest/activity-element) element that precedes\n the alias in the manifest.\n\n \u003cbr /\u003e\n\nintroduced in:\n: API level 1\n\nsee also:\n: [\u003cactivity\u003e](/guide/topics/manifest/activity-element)"]]