'हाल ही में देखे गए' सेक्शन में दिखते हैं और ऐप्लिकेशन फिर से खुल जाता है
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
लॉन्चर
हाल ही में फिर से शुरू की गई किसी फ़ाइल के लिए लेबल और आइकॉन दिखाता है
टास्क. अगर आपका ऐप्लिकेशन पैकेज
लॉन्चर में अलग-अलग गतिविधियों के तौर पर एक से ज़्यादा ऐप्लिकेशन मौजूद हैं, लेकिन लॉन्चर को नहीं पता
गैर-लॉन्चर गतिविधियों के लिए कौन-सा लेबल और आइकन दिखाना है, जैसे
किसी टाइल या सूचना से लॉन्च की गई गतिविधियां. यह हो सकता है
इसकी वजह से, लॉन्चर में आपका ऐप्लिकेशन हाल ही के सूची में न दिखे या फिर
बढ़ोतरी हुई.
सभी गतिविधियों को लेबल करें
पक्का करें कि आपकी गतिविधियां सही तरीके से की गई हैं. इनमें नॉन-लॉन्चर गतिविधियां भी शामिल हैं
लेबल किया गया है, जैसा कि नीचे दिए गए चरणों में दिखाया गया है.
पहली इमेज. सही तरीके से लेबल की गई गतिविधियों के उदाहरण.
अपनी AndroidManifest.xml फ़ाइल में होने वाली हर गतिविधि के लिए, यह तय करें कि कौनसा लॉन्चर इस्तेमाल किया जा रहा है
की गतिविधि हो सकती है.
पैरंट लॉन्चर से आइकॉन, गोल आइकॉन, और लेबल कॉपी करें
लॉन्चर से जुड़ी हर गतिविधि में की गई गतिविधि शामिल है.
लॉन्चर की एक से ज़्यादा गतिविधियों के बीच शेयर की जाने वाली गतिविधियों के लिए, तय करें
कौनसा आइकॉन और लेबल दिखाना है, जो उन सभी को दिखाता है.
हाल ही के टास्क असाइन करें
लॉन्चर में हाल ही के सेक्शन के लिए RecentTasks का इस्तेमाल करने के लिए, पक्का करें कि
आपकी AndroidManifest.xml फ़ाइल में taskAffinity एलिमेंट की सही जानकारी दी गई है
कि आप अपने टास्क और पिछली गतिविधियों को लगातार मैनेज करते हों.
टास्क असाइन करते समय इन बातों का ध्यान रखें:
कोई यूनीक taskAffinity चुनें
नाम डालें. लॉन्चर से जुड़ी हर गतिविधि को ध्यान में रखा जा सकता है
और उसके बच्चों को एक टास्क के तौर पर शामिल कर लिया. उस taskAffinity को संबंधित सभी क्वेरी को असाइन करें
ऐक्टिविटी की जानकारी शामिल है.
ट्रैम्पोलिन गतिविधियां बनाने से बचें, जो सिर्फ़ ऐसी गतिविधियां हैं
अन्य गतिविधियां लॉन्च करना. स्प्लैश स्क्रीन बनाने के लिए
स्प्लैशस्क्रीन एपीआई.
android:excludeFromRecents="true" और android:noHistory="true" फ़्लैग का इस्तेमाल करें
ऐसा करने के लिए, हाल ही के सेक्शन में अपनी गतिविधि न दिखाएं.
अपने हिसाब से सबसे अच्छा लॉन्च मोड तय करना
आपकी गतिविधियां और इन्हें ध्यान में रखकर डेवलप करें.
डीबग करने के लिए सलाह
डीबग करते समय इन बातों का ध्यान रखें:
अगर किसी एक ऐप्लिकेशन के लिए, हाल ही के सेक्शन में डबल एंट्री हैं, तो
यह जांच करें कि क्या NEW_TASK फ़्लैग का इस्तेमाल सही तरीके से नहीं किया जा रहा है.
अगर गलत आइकॉन या लेबल दिखता है, तो पक्का करें कि
गैर-लॉन्चर गतिविधि का आइकॉन, गोल आइकॉन, और लेबल उसके पैरंट जैसा है
गतिविधि.
यदि सिस्टम
लॉन्चर में, गड़बड़ियों का पता लगाने के लिए Logcat देखें ("लॉन्चर पर फ़िल्टर किया गया"), क्योंकि इस समस्या से
ऐसा ट्रैंपोलिन गतिविधि की वजह से होता है.
{% endverba नया %}
आपके लिए सुझाव
ध्यान दें: JavaScript बंद होने पर लिंक टेक्स्ट दिखता है
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (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-27 (UTC) को अपडेट किया गया."],[],[],null,["# Appear in recents and app resume\n\nThe [launcher](/training/wearables/user-interfaces#app_launcher_entries)\ndisplays a label and icon for any recently resumed\n[tasks](/guide/components/activities/tasks-and-back-stack). If your app package\nhas multiple apps as separate launcher activities, the launcher doesn't know\nwhich label and icon to show for non-launcher activities, such as\nactivities launched from a tile or a notification. This might\ncause your app to not show up in the **Recents** list in the launcher or to show\nup incorrectly.\n\nLabel all activities\n--------------------\n\nEnsure that your activities, including non-launcher activities, are properly\nlabelled in your manifest file, as shown in the following steps.\n\n\n**Figure 1.** Examples of properly labeled activities.\n\n1. For every activity in your `AndroidManifest.xml` file, determine which launcher activity it belongs to.\n2. Copy the icon, round icon, and label from the parent launcher activity into each associated non-launcher activity.\n3. For activities that are shared among multiple launcher activities, decide\n which icon and label to display that represents all of them.\n\n | **Note:** If the launcher is unable to determine the correct icon and label, it defaults to the icon and label of your application tag.\n\nAssign RecentTasks\n------------------\n\nTo use `RecentTasks` for the **Recents** section in the launcher, ensure that your\n`taskAffinity` elements are correctly defined in your `AndroidManifest.xml` file and\nthat you manage your tasks and back stack consistently.\n\nKeep the following considerations in mind as you assign tasks:\n\n- Choose a unique [`taskAffinity`](/guide/topics/manifest/activity-element#aff) name for each task in your app. You can consider each launcher activity and its children as one task. Assign that `taskAffinity` to every related activity in your manifest file.\n- Avoid calling `startActivity()` with [`FLAG_ACTIVITY_NEW_TASK`](/reference/android/content/Intent#FLAG_ACTIVITY_NEW_TASK) or [`FLAG_ACTIVITY_CLEAR_TOP`](/reference/android/content/Intent#FLAG_ACTIVITY_CLEAR_TOP).\n- Avoid creating *trampoline activities* , which are activities that only launch other activities. Create splash screens using the [SplashScreen API](/reference/android/R.attr#windowSplashscreenContent).\n- Use `android:excludeFromRecents=\"true\"` and `android:noHistory=\"true\"` flags when you don't want your activity to show up in the **Recents** section.\n- Determine the best [launch mode](/guide/components/activities/tasks-and-back-stack#TaskLaunchModes) for your activities and develop with that in mind.\n\nDebugging tips\n--------------\n\nLook out for the following things when debugging:\n\n- If there are double entries in the **Recents** section for a single app, check whether you are using the `NEW_TASK` flag inappropriately.\n- If the wrong icon or label displays, ensure that each associated non-launcher activity has the same icon, round icon, and label as its parent activity.\n- If the system doesn't launch anything after tapping the entry in the launcher, check Logcat (filtered on \"launcher\") for errors, as this issue can be caused by a trampoline activity.\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Tasks and the back stack](/guide/components/activities/tasks-and-back-stack)\n- [Create custom Quick Settings tiles for your app](/develop/ui/views/quicksettings-tiles)\n- [Learn Jetpack Navigation](/codelabs/android-navigation)"]]