android - Get the status of one application from another application -


i have 2 applications such activity , service. start service activity. when exit activity stops not getting stopped, running in background(could see in settings->manageapplications menu). used android.os.process.killprocess(android.os.process.mypid()) in ondestroy() function terminates application. issue stops service since started activity.i tried using below lines,

activitymanager activitymanager = (activitymanager)this.getsystemservice(context.activity_service);         activitymanager.killbackgroundprocesses(this.getapplication().getpackagename()); 

but still stops service since stop associate processes said in document.my question how can terminate activity without killing service. thanx in advance.

scenario


assume there 2 applications 'a' & 'b'. stop application 'a' using finish() call, 'a' closes successfully. check status of 'a' 'b' using runningprocessinfo call , still find application 'a' running in background.

my question how can terminate activity without killing service.

call finish(), happens automatically when user presses (by default).

when exit activity stops not getting stopped, running in background(could see in settings->manageapplications menu)

an application not activity. application collection of components. in case, application consists of @ least 1 activity , @ least 1 service, based upon information in question.

so used "android.os.process.killprocess(android.os.process.mypid())" in ondestroy() function terminates application.

do not this.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -