Questions tagged [android-recents]

Recents provides an efficient way of switching between recently used applications. It provides a clear navigation path between multiple ongoing tasks.

Information is taken from UI Overview

Recents screen

Recents provides an efficient way of switching between recently used applications. It provides a clear navigation path between multiple ongoing tasks.

The Recents button at the right side of the navigation bar displays the apps that the user has interacted with most recently. They are organized in reverse chronological order with the most recently used app at the bottom.

Switch to an app by touching it. Remove an item by swiping left or right.

120 questions
63
votes
7 answers

How to use UsageStatsManager?

Background Google has deprecated the function "getRecentTasks" of "ActivityManager" class. Now all it does is to get the list of apps that the current app has opened. I've even written a post about it here on StackOverflow, but I noticed it's…
46
votes
4 answers

How to check if "android.permission.PACKAGE_USAGE_STATS" permission is given?

Background I'm trying to get app-launched statistics, and on Lollipop it's possible by using the UsageStatsManager class, as such (original post here): manifest:
25
votes
4 answers

Hide screen in 'Recent Apps List', but allow screenshots

I mainly want to blank the screen in the recent apps list due to sensitive data being shown. For this, the solution is to use: getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE); but this also disallows screenshots, which is a problem. Is…
Rajath
  • 11,787
  • 7
  • 48
  • 62
22
votes
3 answers

How to detect app removed from the recent list?

I'm working on a music app, and I want stop the service when user removes the application from the recent list and not when the first activity is destroyed(because when user clicks back back until app minimizes, in that case first activity is also…
Naresh Gunda
  • 332
  • 1
  • 2
  • 12
11
votes
2 answers

how to keep multiple activities of the same app in the recent-apps list

I have one app with two activities A & B, both with launch mode singleInstance. I notice that even if both A and B are running in the background, only the last activity is shown in recent-apps list. Is it possible to keep both A & B in the…
hixhix
  • 771
  • 7
  • 23
9
votes
2 answers

excludeFromRecents doesn't work with taskAffinity

Possible duplicate: How to not show app on recent apps list in ICS? excludeFromRecents doesn't work Let's say I have two activities A (the main activity) and B. I start B from A as follows: Intent i = new Intent(A.this, B.class); …
kolistivra
  • 4,229
  • 9
  • 45
  • 58
8
votes
1 answer

How to force app to create thumbnail (snapshot) for recent apps list?

Tester of my app has reported: "The thumbnail of the app in the Recent apps list is not tuned at all. At me it appears either like a homescreen wallpapers (tolikdru: probably, just transparent rect), or like green background of the app screen, but…
tolikdru
  • 103
  • 1
  • 7
7
votes
4 answers

Android Lollipop know if app as Usage Stats access

Since Android Lollipop, we have now an API for accessing apps usage stats. However, your app must be granted those permissions by the user. I know that for redirecting the user to those settings using Settings.ACTION_USAGE_ACCESS_SETTINGS. Now, my…
lage
  • 589
  • 2
  • 5
  • 18
7
votes
1 answer

How to exclude from recents an exported activity?

I have an app with an exported activity that can be invoked from other apps (Specifically the sharing action - android.intent.action.SEND) How can an exported activity be excluded from recents? I don't see a way to set the…
AlikElzin-kilaka
  • 34,335
  • 35
  • 194
  • 277
6
votes
2 answers

How to change view before Android App is put to background?

I have an App with two Views, blue view must be shown only when app is in active state (foreground) and the green view must be shown when app is put on background (e.g. clocking on hardware square button on Android). The following picture shows…
shogitai
  • 1,823
  • 1
  • 23
  • 50
6
votes
2 answers

Activity not visible in Recents when app is in background

Issue description In one of my apps I am seeing quite odd behaviour: when my app is running in foreground (is top-most one), then I can see its activities in system's Recents. But as soon as I put it into background, the same activity (i.e.…
Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
6
votes
0 answers

Location of Recent apps screenshots in Android

Where does the OS saves the screenshots it takes of the recent apps? I have searched for the finding the directory location but couldn't find any info. I have also looked through Android source code and found that Google is calling…
Naruto
  • 1,710
  • 7
  • 28
  • 39
6
votes
1 answer

How to not show app on recent apps list in ICS? excludeFromRecents doesn't work

I know it should be achievable be either android:excludeFromRecents="true" in android manifest or Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS Intent flag. Problem is, that doesn't work if application is currently being shown - when Recent Apps button…
Koger
  • 1,783
  • 2
  • 23
  • 34
5
votes
2 answers

Android use a different icon for recent apps

I have a working app but I want to add an alternate version of the app's icon that would be associated with the recent apps window. Instead of the icon that appears on the homescreen, the recent apps window would use the other one.
Rand
  • 1,653
  • 2
  • 12
  • 15
5
votes
2 answers

How to get list of recent apps with Android API 21 Lollipop?

I'm creating a home launcher and I want to have a compatibility with the Android 5.0, Lollipop. I want to get a list of recent apps on the launcher. But since ActivityManager.getRecentTasks() no longer works in API 21, how can I do this ?
rosghub
  • 8,924
  • 4
  • 24
  • 37
1
2 3 4 5 6 7 8