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
0
votes
1 answer

Android service isn't killing background process, nor does stopSelf() work

I want to close Whatsapp, if it is every opened by the user. By close, I mean to completely kill it from the background. The service class should be able to run for 30 seconds. My code is as follows: serviceclass_code: public class Timer extends…
user16117060
0
votes
1 answer

why is android coming from background activity class "com.miui.home.launcher.Launcher"

While the activity is on, I go to the background and when I want to learn the classname from within a service, I see "com.miui.home.launcher.Launcher". I need the activity class. Where am I going wrong? The codes I wrote for classname are as…
0
votes
2 answers

Android WebView got E/ActivityManager: ANR error when used Custom Keyboard

I'm trying to typing in webView by load simple URL (ex : using search in www.google.com). Then my apps suddenly force closed with this following error I was found in the logcat : 2020-12-03 09:51:52.971 1952-1994/? E/ActivityManager: ANR in…
0
votes
1 answer

how to change volume using activity manager (am) in termux

I have android phone with termux app. I know to open a link from termux using the command am (activity manager) am start -a android.intent.action.VIEW -d http://www.stackoverflow.com But now i want to increase or decrease the volume using am…
Santhosh
  • 9,965
  • 20
  • 103
  • 243
0
votes
0 answers

ActivityManager get topActivity package name

I have a same question. I'm use this code, to get a packageName on application running in topActivity from my devise Log.d(LOG_TAG, activityManager.getRunningTasks(1).get(0).topActivity.getPackageName()); When my app is run, I see my app…
0
votes
1 answer

Android: Install another app and detect when it is launched the first time

I have an application that installs other applications, just like Google Play Store. To complete the chain of analytics, I need to be able to detect when the apps installed are launched the first time. Google Play Store definitely has it implemented…
0
votes
1 answer

How can I improve this bash command to get UI rendering times from ActivityManager?

I'm working on a sample app based on Fire App Builder and would like to programatically measure how long (in milliseconds) it takes for an Activity to be drawn. This information is included in the ActivityManager logs: I/ActivityManager( 1843):…
Danny
  • 705
  • 1
  • 7
  • 23
0
votes
4 answers

If home button is pressed without playing the audio, then the app crashes

If I press the home button without playing the audio. The app crashes, but it works perfectly when I play the audio and press the home button. Here's my code: @Override protected void onPause() { Context context = getApplicationContext(); …
Devk
  • 117
  • 11
0
votes
0 answers

Kill signal not delivered from one application to another

Hey I'm working on an application . In which i am killing other application from my application. But it does not work. I am searching a lot and found many solution , But no one is working for me. here is my code. ActivityManager am =…
Sohaib Raza
  • 41
  • 2
  • 10
0
votes
1 answer

Is there a way to get broadcast ? when user switches between apps in android

Is there a way to get broadcast ? When user switches between apps in android.
user3552206
  • 156
  • 1
  • 5
0
votes
1 answer

How i can refresh the value of memInf.availMem?

I don' t understand why the value of memInf.availMem is always the same after the first read. For example: when I start my app the value is 0.441 GB but after many refresh of timer it is always the same. How i can refresh the value? It is impossible…
0
votes
1 answer

Send multiple URIs with adb am

I'm trying to simulate my activity being started with the intent android.intent.action.SEND_MULTIPLE. To do this I need to pass in the extra "android.intent.extra.STREAM" with an array of uris (strings). I'm trying to start this from the shell using…
Kurtis Nusbaum
  • 30,445
  • 13
  • 78
  • 102
0
votes
1 answer

ActivityManager topActivity not working with lollipop

I have an app that is using the topActivity call to timeout after a period of inactivity between apps, which worked fine on android 4.x but since the update to 5.x this has stopped working. The full call is ActivityManager am =…
Cob50nm
  • 911
  • 2
  • 9
  • 27
0
votes
1 answer

ActivityMapper, dealing with regions which don't change a lot

I'm new with GWT and recently I've added Actvivities, Places and ActivityMappers to my code. I have one ActivityManager-ActivityMapper per each region. Regions like the header or the menu dont't change a lot so I have to write a lot of boilerplate…
Nono St
  • 25
  • 7
0
votes
1 answer

Android studio Logcat

Android's logcat (eclipse) used to show ActivityManager manager states Like this 02-23 16:01:15.327: I/ActivityManager(65): Starting activity: Intent { cmp=com.tmrepo/.Clfbpg } 02-23 16:01:17.237: I/ActivityManager(65): Displayed activity…
smash_apps
  • 72
  • 5
1 2 3
8 9