2010-11-22 78 views
0

我有一個應用程序在點擊應用程序圖標(即進入應用程序時)時詢問密碼。然後我設置了UiApplication.getUiApplication()。requestBackground();應用程序在後臺運行。如何識別應用程序是否在後臺運行

現在如果再次進入應用程序意味着它要求密碼。

幫幫我吧。

與問候, 薩姆帕斯

回答

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子類可用。