android - Stop a running app you just started -
have trouble stopping app start startactivity. here how start it:
intent theapp = new intent(); theapp = getpackagemanager().getlaunchintentforpackage(thepackagename); theapp.addcategory(intent.category_launcher); theapp.addflags(intent.flag_activity_new_task); getapplicationcontext().startactivity(theapp);
after has ran awhile, im trying stop this:
if(stopservice(theapp)) log.d(tag,"stopped app successfully!"); else log.d(tag,"failed stop app!");
any ideas why isnt working? in advance help
it seems starting activity. , trying stop service, not work. if want stop whole application. can use system.exit().
Comments
Post a Comment