0

I have an application that ask's password while clicking the application icon(ie. while entering the application). Then i have set UiApplication.getUiApplication().requestBackground(); where application is running in background.

Now if am again enter into the application means it have ask password.

Help me pl.

With regards, Sampath

Martin v. Löwis
  • 124,830
  • 17
  • 198
  • 235
sampath
  • 51
  • 5

2 Answers2

1

You can use UiApplication.getUiApplication().isForeground() method to determine if your application is in the foreground.

The isForeground method is inherited from net.rim.device.api.system Application class which also supports requestForeground and requestBackground methods.

http://www.blackberry.com/developers/docs/4.6.0api/net/rim/device/api/ui/UiApplication.html

Martin
  • 133
  • 6
0

I think you may be interested in the Application.activate() method:

public void activate()

// Handles foregrounding event.

// The system invokes this method when it brings this application 
// to the foreground. By default, this method does nothing. 
// Override this method to perform additional processing 
// when being brought to the foreground.

The UiApplication extends Application so this method is also available in your UiApplication subclass.

Vit Khudenko
  • 28,288
  • 10
  • 63
  • 91