How should I detect the application runs in the background?

Hello friends,

I use 2 statement to run the application in forground and background.

UiApplication.getUiApplication () .requestBackground ();
UiApplication.getUiApplication () .requestForeground ();

I need to check my application is running in the background or forground? someone help me how should I detect that my application in what state?

{if (condition)}

System.out.prinltn ("application run in Background");

}

Else if (condition111) {}

System.out.prinltn ("application in the foreground");

}

What is this condition? and condition111? Please help me with this...

Thank you and best regards,

Ajay Patil.

Hello

With the help of UiApplication.getUiApplication () .isForeground (); You should be able to determine if the application is in the foreground. Hope that helps.

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for