2013-02-15 47 views
0

我在我的游戏中使用Andengine。我面临的问题是,当我的应用程序进入后台时,屏幕上的简历空白。当我在BaseGameActivity扩展类中包含Andengine振动器问题

@Override 
public void onGameCreated() { 
    this.mEngine.enableVibrator(this); 
} 

时会发生这种情况。 请帮忙。

回答

0

想通了,或者我想。而不是在onGameCreated()中初始化振动器,而是在Resume()中完成它,它工作。

@Override 
protected synchronized void onResume() { 
    this.mEngine.enableVibrator(this); 
    super.onResume(); 
}