0

アプリケーション アイコンをクリックしている間 (つまり、アプリケーションを入力している間) にパスワードを要求するアプリケーションがあります。次に、UiApplication.getUiApplication().requestBackground(); を設定しました。アプリケーションがバックグラウンドで実行されている場所。

ここで、もう一度アプリケーションに入力すると、パスワードが要求されていることを意味します。

助けてください。

よろしく、 サンパス

4

2 に答える 2

1

UiApplication.getUiApplication().isForeground() メソッドを使用して、アプリケーションがフォアグラウンドにあるかどうかを判断できます。

isForeground メソッドは、net.rim.device.api.system アプリケーション クラスから継承されます。このアプリケーション クラスは、requestForeground および requestBackground メソッドもサポートしています。

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

于 2010-11-22T17:15:19.713 に答える
0

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拡張されApplicationているため、このメソッドはUiApplicationサブクラスでも使用できます。

于 2010-11-23T21:00:17.000 に答える