Questions tagged [activity-manager]

manages all of the top-level components (activities, receivers, services, content providers) running in them.

Using the Activity Manager, the Android System manages a stack of activities which are in different states (starting, running, paused, stopped, destroyed).

Actually the Activity Manager does more than manage activities. It was named that because in the very early implementations of Android all we had were activities (before we had even implemented multiple processes yet), but in the ultimate implementation the activity manager would probably be better called the "application manager" -- it decides when to start processes, and manages all of the top-level components (activities, receivers, services, content providers) running in them.

133 questions
7
votes
1 answer

Move the Default Incoming Calling Screen to Background on TelephonyManager.CALL_STATE_RINGING in Android

I am working on an application in which I have to override the INCOMING CALL SCREEN. When device receives a call, I have to show a popup of my application. I have done a detailed research about this task. CALL POPOUT is an application which is using…
6
votes
4 answers

How to get all the tasks that are running currently

I want to get all the tasks that are running in android.I found getRunningTasks in ActivityManager but from android-5.0 the getRunningTasks may not give all the tasks (in my case it's give the home screen and my application). In addition is it…
Viking93
  • 269
  • 2
  • 3
  • 15
6
votes
2 answers

Android: How to determine if IntentService is running?

I have an activity for upload from which I am calling Intent service. In there I am handling the API request call. I want an activity to know whether the service is running or not, to show an uploading tag. I tried following to determine if the…
6
votes
3 answers

How to get the list of all non system apps in android

I am developing an application, in which i want to get the list of all non system apps. Here is my code part: TextView tv = new TextView(this); this.setContentView(tv); ActivityManager actvityManager = (ActivityManager) …
Akhilesh Sk
  • 451
  • 4
  • 18
5
votes
2 answers

Is it possible to start activity through adb shell and receive its response?

I know that you can start any exported activity from any app via adb using the following command: am start -n com.myapp.test/.TestActivity Using the "am start" command it is also possible to send extra data to the activity (I know how to do this,…
Robert
  • 39,162
  • 17
  • 99
  • 152
5
votes
2 answers

Android M: How can I get the current foreground activity package name(from a service)

It is easy to get a list of running tasks from the ActivityManager service on Android L, and the current active task is returned first. But it don't work on Android M any more, the return list only contains my app task. Is there any way to settle…
Mr.Clear
  • 53
  • 1
  • 4
5
votes
0 answers

How does libprocessgroup in Android work?

Lets say an application process is started by the zygote, with PID 1234. When the app launches, PID: 1234 forks another process, say with PID: 1300. When I exit the app, PID: 1234 is killed with a signal 9 (SIGKILL). PID: 1300 then becomes an…
sg1993
  • 335
  • 2
  • 19
5
votes
0 answers

Call ActivityManagerService methods from my application

I've created a system application on a rooted device and was wondering: is there a way to access methods in ActivityManagerService from that application? I've tried using the ActivityManager object but not all methods also exist in…
5
votes
10 answers

Cannot run Android application on emulator/device - activity doesn't exist?

When trying to run my application on the emulator I get an error from the activitymanager: ActivityManager: Error type 3 My activity exists, is listed in the manifest (in fact, its the MAIN launcher activity). Anyone know what this error means?
Eno
  • 10,730
  • 18
  • 53
  • 86
4
votes
1 answer

Android - Can't start an activity with "am start" when running as user on Android 11

I don't know if this is a new restriction, but with an Android 11 device, I can't run "am" from native code or the shell when I am running as my app's user. It works fine without run-as. Is this a new restriction, or is there some permission I can…
g01d
  • 651
  • 5
  • 24
4
votes
5 answers

Android ActivityManager killBackgroundProcess not working

I am using eclipse. I am trying to kill a process in my application. However, in eclipse it does not seem to know the hint for killBackgroundProcess from the ActivityManager and it will not let me proceed. I read that you have to have permissions to…
ngreenwood6
  • 8,108
  • 11
  • 33
  • 52
4
votes
2 answers

Dealing with Samsung SPCM killer

Lately we acquired a new Galaxy S6 with Android 5.1.1 and we are having some troubles with the new Samsung SPCM memory manager that comes with it. It is aggressively closing our app's background service, which even though is set to START_STICKY, it…
Nom1fan
  • 846
  • 2
  • 11
  • 27
4
votes
0 answers

ActivityManager: Force removing ActivityRecord app died save no state

I am developing an application in which i have to download files from SD card or USB to my phone I am using aynctask to do the same but the problem when the copying process is going on from USB drive to phone and we remove the usb device my…
Srini
  • 41
  • 1
  • 3
4
votes
3 answers

How to get running package names for Android L

So we all know that the getRecentTasks() and getRunningTasks() on ActivityManager are now deprecated and will return a reduced result set on Android L and higher devices. Alternative to getRunningTasks in Android…
Rohit Tigga
  • 2,373
  • 9
  • 43
  • 81
4
votes
0 answers

onPause() method issue on kitkat 4.4

My app contain lock screen which will be come up when app brought from background. I am facing a problem particularly onwards kitkat 4.4. While app goes in background, i am checking that the Is application going in background? in onPause() method of…
Rohan Patel
  • 1,758
  • 2
  • 21
  • 38
1
2
3
8 9