Android Forums

Go Back   Android Forums > Android Coders > Android Development, Answers, Tutorials, and Code Snippets
Connect with Facebook

Click Here To Register!
Reply
 
LinkBack Thread Tools Display Modes
Old 03-17-2010, 06:16 AM   #1
New Member
 
Join Date: Mar 2010
Posts: 3
Friends: 0
View jhoondlani's Profile   View jhoondlani's Photo Album   View jhoondlani's Blog   View Social Groups
Hi All,

I am having a requirement that i want to close a process that is running from my application.

For Example :

If a pdf file is opened in the device, i want that if my application is launched it should close.

I am able to get the process id i.e 620 & process name : "com.htc.pdfreader"
by using

for (int i=0;i<appList.size();i++)
{
RunningAppProcessInfo rti = (RunningAppProcessInfo)appList.get(i);
Log.v( "", "PID"+rti.pid+"Process Name"+rti.processName );
}
Now, for closing this i have tried

android.os.Process.killProcess(Process ID);

But no success.

then i tried :

process = Runtime.getRuntime().exec(rti.processName);
process.destroy();

again it was not successful.

Can you please let me know how this can be achieved.

Thanks
Jaya
jhoondlani is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Reply With Quote
Reply

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Android.process.acore has stopped unexpectedly Gary Android Chat 20 01-16-2012 05:42 PM
Process.com.htc.dcs hinterland Hero 0 03-05-2010 08:54 AM
Android process has stopped dancemom Android Hardware 0 01-16-2010 12:25 AM
Android.process.acore..... gorgeous1387 Android Chat 3 11-26-2009 06:22 PM
Facebook link forces close: android.process.acore jaywitch Hero 2 08-27-2009 12:39 PM


Unlocked G1 Phones | Buy T-Mobile G1 | Google Phone

All times are GMT -6. The time now is 11:41 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright (c) 2008 TalkAndroid.com. All rights reserved.