system.exit - Killing Android app 2 from app 1 -


I have 3 Android apps if a user has an app1 open, should check to see if The app 2 is running, and / or the AP3, and if so, then kill it

Here is what I have tried here.

A broadcast receiver () was applied to each app.

  mFinishReceiver = New Broadcast Receiver () {@Override Public Reconnaissance on Nil (Reference Reference, Intent of Intent) {Log. V ("intent", "Got kill intent, I am" + pn); If (killAction.equals (intent.getAction ())) {killmePlease (pn, killAction); }}}; Register receiver (amphinish receiver, intent filter);  

And then, by using this, I try to kill the app.

  Please do private zombie marmala (string pn) {intent _quila = New Intent (this, MainActivity.class); StartActivity (_killme); Try {log. V ("intent", "finishing" + pn); SetResult (RESULT_OK); MainActivity.this.finish (); System.exit (0); Logs. V ("intent", "expired"); Return; } Hold (exception before) {log. V ("intent", "error killing" + pre .getMessage ()); }}  

However, apps are still running with errors thrown. Can someone please tell me what am I missing?


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -