Android :: How To Get Application Name From Process?
Jul 12, 2009
I am trying to retrieve all applications that are running on the android phone. Following is the code I have wrote, but how do I get the application name into my Array items?
Context context = getApplicationContext(); Resources appR = context.getResources();
ActivityManager actmgr=(ActivityManager)context.getSystemService (Context.ACTIVITY_SERVICE);
List<RunningAppProcessInfo> appList = actmgr.getRunningAppProcesses();
CharSequence[] items = new CharSequence[appList.size()];
Vector <Process>allProcesses = new Vector <Process>();
for (int i=0;i<appList.size();i++) {
RunningAppProcessInfo rti = (RunningAppProcessInfo)appList.get (i);
Process p = new Process (rti.pid,rti.processName,rti.pkgList);
allProcesses.add(p); items[i] = p.getProcessName(); } : : :
View 2 Replies
Apr 26, 2010
If an application begins a Service via bindService or startService, will this Service object ever run from a process different from that of the application? I ask because many Android example projects begin a service and communicate to them using IPC which seems wholly unnecessary considering that, according to the Android Service documentation, "... services, like other application objects, run in the main thread of their hosting process." IPC, AIDL, and the IBinder interface only seem useful if connecting to a Service started by an application other than your own. Is this a correct or fair understanding?
View 1 Replies
View Related
May 12, 2009
As an exercise I attempted to add an AppWidgetProvider-derived class to one of our existing Android applications. When the widget is created and appears on the home screen, the output from adb logcat notes: W/ActivityManager(58): Unable to launch app com.mycompany.myapp/ 10042 for broadcast Intent { action=android.appwidget.action.APPWIDGET_ENABLED comp= {com.mycompany.myapp/com.mycompany.myapp.MyAppWidgetProvider} }: process is bad
This output comes from around line 10814 in ActivityManagerService (looking at cupcake on git). This is running on an ADP 1.5, FWIW. The same AppWidget code, once separated from the main application's project and put into its own simple project, runs as expected, so I know my manifest entries/XML/Java are all as they should be. Has anyone else run into this, or perhaps can the Android team comment on what aspect of my application might be preventing the AM from starting up the process when the widget is added to the home screen?
View 6 Replies
View Related
Apr 22, 2009
For some reason I can't explain, when my app runs, I will on occasion get the following error message: "The application xxxxxxxx (process xxxxxx) has stopped unexpectedly. Please try again". When I debug my code, it seems to break at random places that doesn't make sense. On top of that I tried to surround the entire code with a try/catch block just to try to catch the exception, but it doesn't work either. I'm suspecting it's the OS that is producing this error message but I don't know why. As far as my code goes, if there were exceptions caused by it, it would've been caught by the try/catch block. Can someone shed some light here?
View 13 Replies
View Related
Jan 14, 2010
I am seeing a curious behaviour in my app. I have a widget that gets updated by a service every # hours, when the service finishes I stop it, using "stopService(new Intent(this, MyService.class));", the widget if pressed launches an Activity. Now it gets interesting, while im on the activity everyting works fine, then when I exit the app(by the back key or a button I designed which simply calls this.finish() ) the ActivityManager would tell me that my process has died, I do not see any error of any kind, just that the process has died.
Why I am seeing that message and what does it mean exactly? That is having a side effect on my service regarding static variables getting set to default. Could my code be the cause of this? Is there any way to know that your process has died? I have tested my app on a HTC Hero running 1.5, it always works well on the emulator and I never get that message. I know android kills processes to reclaim memory but Im always careful to close apps heavy on resources.
View 4 Replies
View Related
Aug 5, 2010
Is android's memory 16MB limit per Process or Application? If the limit is by process, I can make some services remote. That means the service will be in different processes, and the limit will be 16 x N.
View 3 Replies
View Related
Mar 15, 2010
Being interested in Android development and still in the experimentation phase - there's something I haven't been able to grasp. As far as I've been able to understand, the process lifecycle and application lifecycles are separate and as such, it would be possible for the application to still to exist, even if it's process has been killed. So I guess my question would be, in what scenario could this occur and how is the application accessible if the containing process has been killed?
View 5 Replies
View Related
Oct 31, 2010
In a comment on an epic StackOverflow question-and-answer, a gentleman who I will call Tim has outlined a scenario he says he is running into, one I have some difficulty believing. Reading somewhat between the lines, the flow would appear to be this:
1. User taps on an activity icon in the launcher 2. Process starts up 3. Application object is put in that process -- and a custom Application object loads an NDK library which initializes some statics/singletons 4. User uses application 5. User abandons application (e.g., HOME) 6. Later, user returns to application, before the first process is killed or recycled for use with another app 7. A second Application object is created, in the same process, before the first Application object is called with onTerminate()
This screws things up for Tim's app -- apparently, it does not deal with pre-initialized statics/singletons well. They were presumably counting on onTerminate() to let them clean up the NDK space. As a result, they are relying upon killProcess() (somehow...unclear under what conditions they might call this) to force their own process to go away, so their statics get cleaned up. Step #7 is what confuses me. I can see a new Application object being created, but only if the first Application object were terminated. I don't see any NDK-related bugs out on b.android.com that seem to match this complaint, though in principle it might cause problems for non-NDK apps as well. Has anyone encountered a new Application object being created in a process before the old one is terminated?
View 16 Replies
View Related
Apr 9, 2009
After long running the Media|Player (audio mode) the app I'm developing often crashes w/ the following error: > Process android.process.media (pid 14795) has died. > Killing <my app> because provider com.android.providers.media.MediaProvider is in dying process android.process.media
View 3 Replies
View Related
Nov 4, 2008
One of the winners of the Google app contest was Jigsaw by Mikhail Ksenzov, an app to capture and process whiteboard data. The app isn't in the market, and I can't find anything via Google about it's status. Is it still beta, or what?
View 1 Replies
View Related
Jun 24, 2010
I have been struggling with uploading my application to android market. I keep getting the same old "The server could not process your apk. Try again.". I tried for hours to change and modify my AndroidManifest.xml file but no luck.
Here is my my AndroidManifest.xml:
CODE:............
View 2 Replies
View Related
Sep 1, 2010
When a try to deploy my android App in the emulator, after the application(.apk) gets loaded in to the emulator, when I tap on the menu button in emulator for loading my application's initial screen, its is raising me a alert message with this information:
<pre>Sorry Application Keyboard in Process (Force Quit / Wait)..</pre>
and some other similar messages too..
How can I avoid this issue that is happening at all time, When this happens, unless I tap on Wait button, I can't able to proceed.
View 1 Replies
View Related
Mar 2, 2010
I have develop some application using sending sms" when I try sending sms show up " The Application xxx(Process com. Bhn.xxx)has stoped unexpectedly
Any body knows , about that error ?
View 2 Replies
View Related
Sep 15, 2010
Camera application process dies and restarts again when device is Locked/End Call Key is clicked. Steps to reproduce: 1) Launch Camera application. 2) Click on End Call key(it acts as lock screen when there is no active call) or wait till device is locked. 3) Camera application is paused and surfaceDestroyed callback is not being called. 4) Camera process has died and restarted again. I would like to know why Camera process has died after onPause is being called and restarted again when device is put to Lock state. For all key events like BackKey,HomeKey and Accept Key it is working fine.
View 4 Replies
View Related
May 21, 2010
Sometimes the DDMS in the Eclipse not listing the process.
To do the debug in this condition,
1) Is their any way force the DDMS to list the process?
2) Any command to attach the process from the command line?
View 2 Replies
View Related
Feb 21, 2009
At a certain point in my program, when I'm completely done with my service, my activity executes unbindService() and stopService() -- yet the process persists. I can tell that it persists because I run "ps" in "adb -e shell":
CODE:.............
"adb logcat", I can show you the sequence of events:
ACTIVITY: context.unbindService(serviceConnection);
SERVICE: onUnbind();
ACTIVITY: stopService(serviceIntent); & returns true!
SERVICE: onDestroy();
First, my activity calls unbindService(serviceConnection). According to the documentation, unbindService() will "Disconnect from an application service. You will no longer receive calls as the service is restarted, and the service is now allowed to stop at any time." So that is fine, and it is happening.
Appropriately, we see the onUnbind() call happen on the service side. According to the documentation, onUnbind() is called when "all clients have disconnected from a particular interface published by the service." So this confirms the correct service connection is being passed, and that the service is responding accordingly.
Next, my activity calls stopService(serviceIntent), and returns true. According to the documentation, stopService() does the following: "If there is a service matching the given Intent that is already running, then it is stopped and true is returned; else false is returned." Again, this is happening and returning true.
In response, the service's onDestroy() method is called. According to the documentation, onDestroy() is "Called by the system to notify a Service that it is no longer used and is being removed. The service should clean up any resources it holds (threads, registered receivers, etc) at this point. Upon return, there will be no more calls in to this Service object and it is effectively dead."
At this point I expect the process to disappear from the process table. Yet it remains indefinitely. But why?
Also, the process is so persistent that I can bind to it again, and I see that it is the same exact process responding because the PID (process ID) is the same!
View 4 Replies
View Related
Nov 24, 2010
So, I decided to give Tridents ROM a try about 10-minutes ago.
I used ROM Manager, backed-up my old ROM, then downloaded Velocity 0.2.
Now, my phone will do nothing, it turns on and shows the red Droid eye, then when it's time to go to the home screen I get pop-up after pop-up saying that "The process com.android.phone has stopped unexpectedly. Please try again."
I have no way of getting on my phone at all, what can I do?
View 11 Replies
View Related
Jun 23, 2010
I seem to get this error message when I turn on the phone after powering off. I get to click "force close" and then it seems to work ok. "The application HTC Sense (process com.htc.launcher) has stopped unexpectedly."
View 7 Replies
View Related
Nov 12, 2010
I Just installed a new theme (Live Wire) for my Lithium Mod Rom. Don't know if there is a connection, but when I need to update an app, I get the message something like "process android media process stopped unexpectedly" and it will not allow the update. Everything else works well. I have turned it off for awhile, and have done a battery pull.
View 1 Replies
View Related
May 11, 2010
Every 5 minutes this error pops up "Sorry! the process android.process.acore has stopped unexpectdly. please try again." It doesnt actually close anything. It pops up even when im not in an app. So it's more annoying than anything.
View 3 Replies
View Related
Nov 23, 2010
Situation: Second day of owning X8. So I'm downloading some Apps and one of them took forever, the download arrow was showing activity all through the night. (I was on WiFi) This morning, I pull down the Activity bar and see that the phone thinks the Download is still continuing. I couldn't see anyway to force quit other than turning off the phone. So, how does one Kill an Activity, Application, or Process in this Android system?
View 4 Replies
View Related
Sep 20, 2010
So I rooted my inc using unrevoked 3 beta. I had upgraded to 2.2 using the leaked update.zip. I installed cyanogenmod, didn't like it, and did a nandroid backup restore to get back to sense. I then installed hydra kernel 1.15. I went back to the stock kernel thinking that that might be it, but to no avail. Now, after turning my phone on, the following screen pops up 5 or 6 times:
I'd be willing to totally wipe my phone and start new. (I can reinstall apps with titanium after I reroot).
View 2 Replies
View Related
Jul 30, 2010
I'm using Xperia x10 mini. Whenever I try to add a contact to my phonebook, before clicking save this message appears: "The process android.process.acore has stopped unepectedly. Please try again." And I have no other choice but to click "force close"... Another thing is, even though my contacts' names appears in the messages in my inbox, when I click on the phonebook icon, the phonebook is empty...
View 4 Replies
View Related
Feb 1, 2010
Are the processes in android asynchronous? If they are asynchronous then how can we conclude when the activity or process is finished or completed its execution.
View 2 Replies
View Related
Jan 7, 2010
I have the HERO for about 3 weeks now. Until yesterday everthing was ok with the phone, but since yesterday i get this message: "The application TouchFLO (process com.htc.launcher) has stopped unexpectedly. Please try again" when i want to use the weather widget. When this message appears i get only Force Close as an option.
View 7 Replies
View Related
Oct 18, 2010
I will try to be as brief as possible... I have published a very simple android application it's name is "Vib-e-rator PRO". It's purpose is obvious, it can be used as a masssage vibrator or as an erotic stimulator...
My Problem is don't have an Android Phone to test my app in real time.
I have been recieving mixed comments from people. A few users say its working fine. But majority of them complained that the Phone would n quit vibrating even after the closing application.
Later i speculated that when ever the user switched off the vibrator and quit the app it would work as expected. If any user (most of em) directly closed the application ( either through the close option provided in the app itself or by pressing the END button in the phone ) without switching off the vibrator then it would not stop vibrating.
So i added myvib.Cancel() (myvib is the context for Phone Vibrator) in the exit block the close option provided in my app. For the other scenario, when it is closed by pressing the END button in phone, i have no idea how to solve it... So friends please advice me what is necessary to do... The comments i have been receiving from many users of my app is really embarassing....
View 3 Replies
View Related
Feb 4, 2010
Absolutely LOVELY. Went on beautifully with no bubbles or trapped dirt, though I must explain my application process. I did like most users suggested and ran a steaming hot shower and closed the doors, from here I used a sticky sheet that came with my iPod Touch screen protector that you lay on the device and then peel off to remove all dust, then cleaned all smudges with the microfiber cloth.
To put on, I simply peeled back the top end of the protector only, with the hard card thingy they give you for bubbles in my other hand, then slowly lined up the protector on the top edge and over the earpiece, from here I just squeegeed down the phone, peeling back more and more until it was on, then I got rid of all other little bubbles, and that was that! Perfectly applied!
Thoughts:
So I am very used to anti glare/fingerprint protectors, as I am totally unaccepting of the slightest smudges, so I am very accustomed to the clarity loss, but I do understand that this has been a problem with others who have purchased this protector. I can say that it is not really any worse than any other anti glare protectors, and there's hardly any rainbow effect on white screens, if any at all, which is a big improvement over the lexerd anti glare I had on before this one (we won't get into much of that, just don't ever buy it).
NO fingerprints show, it's amazing, I mean with my other one it would heavily reduce them, but they would still sort of show in direct light, here, NONE! And the matte feeling gives the best feeling and sound when swiping (or should I say Sywpe-ing) on the touch screen.
I HIGHLY recommend this protector if you want the anti-glare and no fingerprints and of course don't mind the recuction in screen clarity, and with the Droid and its beautiful screen, this can be a bit hard, but if you can sacrifice a bit, you will be extremely happy!
View 6 Replies
View Related
Nov 3, 2010
I can track the overall bandwidth usage of Android device. I wanted to know if there is any method or way, maybe any API or class that can help me track my bandwidth usage per application or process? Reason for this question? I want to stop all those processes or applications that are using way too much bandwidth usage and draining the battery.
View 1 Replies
View Related
Sep 11, 2010
So since I got the phone on Thursday, at random, I'll get these popup crash messages, that say "The process com.google.process.gapps has stopped unexpectedly" it has a "Force Close" button, which doesn't seem to change anything other than to acknowlege the message.It will happen at random, sometimes while I'm on the home screen, or sending a text message, but more recently, as I was trying to manage & link contacts. When I searched for this message it seemed to be related to people using Gmail, but I always get this message when I'm doing other things and not even touching my Gmail account.
View 1 Replies
View Related
Sep 19, 2009
I bought a new phone, but I can not run it.
I get the following information: "Sorry! The process com.google.process.gaps has stopped unexpectedly. Please try again".
View 1 Replies
View Related