Solve the problem that the android program is running and does not display in recent tasks after exiting.

Source: Internet
Author: User

Http://blog.school51.com/show_diary.asp? Uid = 84890 & logid = 622777

 

Solution:
In the activity corresponding to androidmanifest. XML, find "Android: excludefromrecents", change the value to false, or directly remove the item.
E.g.
Androidmanifest. xml<Activity Android: icon = "@ drawable/ic_launcher_fmradio" Android: Name = ". fmradio "Android: Label =" @ string/app_name "Android: taskaffinity =" "Android: launchmode =" singletop "Android: screenorientation =" portrait "> <! -- Android: excludefromrecents = "true"
--> <Intent-filter> <action Android: Name = "android. intent. action. main "/> <category Android: Name =" android. intent. category. launcher "/> </intent-filter> <action Android: Name =" com. quicinc. fmradio. fmradio_activity "/> <category Android: Name =" android. intent. category. default "/> </intent-filter> </activity>

Develop reference

android:excludeFromRecents
Whether or not the task initiated by this activity shocould be excluded from the list of recently used applications ("Recent apps "). that is, when this activity is the root activity of a new task, this attribute determines whether the task shocould not appear in
The list of recent apps ." true"If the task shocould be ExcludedFrom the list ;" false"If it shoshould be Included. The default value is" false".

======================================

On the contrary, you can add Android: excludefromrecents = "true" if you do not need to add any activity in the APK.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.