Android App problems bringing right main activity to front -


After the app has expired, I'm trying to bring my application (user press button back) but this is only my Opens the last opened app in front of me, so if I am using a different app in the middle time then this app will open and my app will not be. Maybe someone can help me - I tried many different combinations with the flag, but it does not work. Also, I did not find any solution to get my app back if the display was locked - maybe it could be a good solution for someone or give me advice Thanks

  Public class incoming broadcaster receiver Broadcast receivers Expands {@ Public invalid prevention on dieting (reference references, intended intentions) {MyActivity myActivity = (MyActivity) Reference; MyActivity.doWork (); } Public class enhances MyActivity activity {Private Boolean app InBackground = false; ... @ Override public ontop (at zero) {appInBackground = true; super.onStop (); } @ Override Public Zero Finish (if (ExitPressed) {super.finish ();} and {appInBackground = true; moveTaskToBack (wrong);}} Public Zero doWork () {// Bring Apps to the foreground (App in Background) {intent1 = new object (getBaseContext (), MyActivity.class); Intent1.addFlags (int. FLAG_ACTIVITY_NEW_TASK; int. FLAG_ACTIVITY_CLEAR_TOP); startActivity (intent1);} ....}   

}

Android Manifest Launch Mode: Android: Launchmode = "Singlettak"

UPDATE: I get my app from incoming SIP calls, To override the method ()

  // main activity @OrrideCarate (bundled savedinstantstate), take a look at the demo application ... {callReceiver = new IncomingBroadcastReceiver (); Registry receiver (call receiver, new intent filter ("com.example.INCOMING")); ... // I = SIPProfile Intent i = new intent (); i.setAction ("com.example.INCOMING"); pending anticipated PI = Pending ITabreadcast (getBaseContext (), 0, Eye, Intestine FILL_IN_DATA); Manager.open (m, p, null); }   

Example: My app is in the foreground and I press the back button to take it back. Then I go back to the main screen by pressing the Home button, for example open another app for hangouts. If the broadcast receiver "comes" the call from my app, but it opens the hangouts.

My app is in the foreground and I press the back button

When you press the back button, the example of the current activity is lost. Then the background set of the app

  @ override on public at zero () {appInBackground = true; Super.onStop (); }   

is also lost.

The next time you receive the broadcast and the public works from zero () , the background in the app is zero.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -