我有一个应用程序在单击应用程序图标时询问密码(即在进入应用程序时)。然后我设置了 UiApplication.getUiApplication().requestBackground(); 应用程序在后台运行的位置。
现在如果我再次进入应用程序意味着它有询问密码。
帮帮我。
关于, Sampath
我有一个应用程序在单击应用程序图标时询问密码(即在进入应用程序时)。然后我设置了 UiApplication.getUiApplication().requestBackground(); 应用程序在后台运行的位置。
现在如果我再次进入应用程序意味着它有询问密码。
帮帮我。
关于, Sampath
您可以使用 UiApplication.getUiApplication().isForeground() 方法来确定您的应用程序是否在前台。
isForeground 方法继承自 net.rim.device.api.system Application 类,该类也支持 requestForeground 和 requestBackground 方法。
http://www.blackberry.com/developers/docs/4.6.0api/net/rim/device/api/ui/UiApplication.html
我想你可能对Application.activate()方法感兴趣:
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.
UiApplication
extends所以这个Application
方法在你的子类中也可用UiApplication
。