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
1
vote
0 answers

How to kill background running apps in Android ?

I want to develop a task-killer . The task of this app is to kill background running applications . I have searched a lot in the internet and found the following code to kill installed application . List packages; …
osimer pothe
  • 2,827
  • 14
  • 54
  • 92
1
vote
1 answer

Get cpu, ram and network usage statistics on Android

I have to create an application that is able to gather data about cpu, ram and network usage of all applications installed on the device. Is there any Android API to get this info? I have not find any. ActivityManager is able to provide data only…
Macple
  • 41
  • 11
1
vote
0 answers

how does bitmoji detect whatsapp activation on android

i read that there are basiclly 2 ways to detect application launches in android: 1)poll activity manager for the foreground activity (top of the stack) 2)poll the log - although i read that you can no longer do that in newer android versions because…
Gabriel H
  • 1,558
  • 2
  • 14
  • 35
1
vote
0 answers

How to create a Listener to detect which Activity is in the Foreground?

I've created a service that creates a chatHead (like Facebook Messenger). However, I want it to have a listener that always checks which activity or application is in the foreground. Here's my code- public class ChatHeadService extends Service…
deathstroke
  • 526
  • 12
  • 33
1
vote
2 answers

am start cannot find main activity listed in manifest

I am trying to start an activity for an app (which I did not write in case you were wondering) through the adb shell. The manifest has the lines:
njvb
  • 1,377
  • 3
  • 18
  • 36
1
vote
2 answers

finish or close an application from another application

I want to know, is it possible to finish or close an running application from my application? If yes then how ? I googled regarding this but not found any solution. I tried using killBackgroundProcesses but it also not worked for me. The…
maddy d
  • 1,530
  • 2
  • 12
  • 23
1
vote
2 answers

windows phone - is it possible to develop an app that will track other apps usage?

I'm interested to know if it's possible to develop an similar app for windows phone like those…
user3265943
  • 329
  • 2
  • 10
1
vote
1 answer

Call an activity method using ActivityManager

I'd like to get a running activity of my application and call one of its method (I'm inside of a service). I have found that I need something like this, but i can't resolve my problem. Is it possible? ActivityManager am = (ActivityManager)…
As As
  • 2,049
  • 4
  • 17
  • 33
1
vote
0 answers

Are there an handler or a broadcast that can start the service when the app is changed in the foreground?

I have a service that runs in the background. I want this service to see which app the user has in the foreground. I can do it with the service is running every second and checks which app is in the foreground this will kill the battery. Are there…
1
vote
1 answer

How to know if fsck is running?

My Android app needs to store 15 GB of data, so it needs to use removable storage. So I need to check if fsck is running while my app is loading (to quit if that is the case). Of course I can do a Runtime.getRuntime().exec("ps"); but I have read…
Luis A. Florit
  • 2,169
  • 1
  • 33
  • 58
1
vote
3 answers

How can I determine permission of Running apps programmatically in android?

I want to see the permission of running apps of android in my software. For this reason ,I have the following code : List apps = new ArrayList(); ActivityManager am = (ActivityManager)this.getSystemService(ACTIVITY_SERVICE); …
osimer pothe
  • 2,827
  • 14
  • 54
  • 92
1
vote
2 answers

Got threadid=1: thread exiting with uncaught exception (group=0x41088930) on listview

i'm making an app that shows running apps icon on listview. there are no syntax problem (i think) but when i launch app and try to run activity, the app force closes and i got threadid=1: thread exiting with uncaught exception (group=0x41088930)and…
1
vote
1 answer

How can i show running app icon in listview using ActivityManager and PackageManager?

I'm trying to making a app that.. -shows currently running app icons in listview -click item on listview that shows running app icons to switch But i don't know how to do these, and i already googled a lot but i found that i should use…
sukso
  • 145
  • 1
  • 8
0
votes
0 answers

How does ActivityManager measure app launch time?

From the AOSP documentation you can measure the time to initial display by running your app using ADB: adb shell am start -S -W com.example.app/.MainActivity The output is as follows: Starting: Intent Activity:…
0
votes
0 answers

How can i create a foreground service which keeps track of which applications are being opened?

I am creating a productivity app which needs to know which apps is currently being used by the user. This is the code pertaining to the foreground service which I am using: public class DemoService extends Service { @Override public void…
1 2 3
8 9