简体   繁体   English

从最近的应用列表中删除一个应用

[英]Removing an application from the recent app list

I want to disable my app from the recent apps list, I don't want to remove the app I just want to disable it from recent apps list.How can I do this? 我想从最近的应用程序列表中禁用我的应用程序,我不想从最近的应用程序列表中删除我只是想禁用它的应用程序,我该怎么做?

this is my code 这是我的代码

<activity
   android:name=".Your_Root_Activity_Name"
 android:excludeFromRecents="true"
 .... 
</activity>

I have used above code in my manifest but it remove my app from recent app. 我在清单中使用了上面的代码,但是它从最近的应用程序中删除了我的应用程序。

Android does not have a concept of apps being disabled in the overview screen (recent apps list). Android在概观屏幕(最近的应用程序列表)中没有禁用应用程序的概念。 There is no means via the Android SDK of doing what you want. 无法通过Android SDK进行所需的操作。 android:excludeFromRecents is the closest thing, which as you note blocks that activity from appearing in the overview screen. android:excludeFromRecents是最接近的内容,如您所述,它阻止该活动出现在概览屏幕中。

I am not sure whether i got your question or not, but the thing which i understood is you do not want to memorize the activity in stack when going to back to previous activity.... If this is what you want then just include the property in the activity tag with in AndroidManifest. 我不确定是否收到您的问题,但是我了解的事情是,当您回到上一个活动时,您不想记住堆栈中的活动。...如果这是您想要的,则只需包含在AndroidManifest中的活动代码中添加属性。 android:noHistory="true"

<activity
      android:name=".registration.MainActivity"
      android:label="@string/app_name"
      android:noHistory="true"
      android:windowSoftInputMode="adjustPan"/>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从最近的应用列表中删除应用时,请避免取消通知 - Avoid cancelation of Notification on removing app from recent apps list 在Activity上调用finish()时从最近的应用程序列表中排除该应用程序 - Excluding the application from recent app list on invoking finish() on Activity 从Android最近的应用程序堆栈中删除应用程序 - Removing an application from recent applications stack android 当我们通过从最近的列表中删除关闭应用程序时,未触发android IncomingHandler - android IncomingHandler not fired when we close the application by removing from recent list 按返回键无法完成我的应用。 但是将其从最近的应用列表中删除可以 - Press back key can't finish my app. But removing it from recent apps list can 如何从最近的应用程序列表中删除应用程序? - How to remove application from recent application list? 从 Android 中的最近应用程序列表中删除应用程序是否会导致它禁用警报管理器在 Android 应用程序中设置的任何警报? - Does removing an app from the recent apps list in Android cause it to disable any alarms that have been set by the alarm manager in an Android app? 如果应用程序之前未显示最近的应用列表,则应用程序不应在完成活动后显示在最近的应用列表中 - Application should not display in recent app list after finish the activity if app was not displaying recent app list previously Android:关闭应用程序并从最近的列表中打开它 - Android: Closing the application and opening it from recent list 从最近的应用程序中删除后,小部件在Android KitKat上停止 - Widget Stop on Android KitKat After Removing It From Recent App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM