开发者

How i handle the game continue and external events in android(Andengine)

开发者 https://www.devze.com 2023-04-07 13:46 出处:网络
I am developing the game using andengine. How i handle the game continue options after redirect to home screen(press home key ) but the timer in running in background.

I am developing the game using andengine.

How i handle the game continue options after redirect to home screen(press home key ) but the timer in running in background.

How to h开发者_开发知识库andle the external events (Incoming calls, sms). In j2me i used hideNotify and show Notify . How i make in andengine


You must make all of actions that will save the state of your app in onPause() method of the Activity. This method calls when the new activity put in the head of activity stack.


I think you should read this article containing the fundamentals about the activity lifecycle which pretty much covers all you need to know about how to handle an application going into background, exiting, coming back to front: http://developer.android.com/guide/topics/fundamentals/activities.html#Lifecycle

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号