Not sure exactly what you're asking here, so here goes: If you're asking how the user can tell the game to pause, then you need some sort of control in the UI that the user can invoke to trigger the pause action in your game. This could be a very small button, maybe in the corner of your game that the user can click on. Or maybe it's a special key that the user can press (assuming a physical keyboard here), or maybe a menu from hitting the Menu button on the device. As soon as the event happens you can stop the game action, present the choices to the user and decide what to do from there.
If you're asking how to save the game parameters so it picks up where the user left off, then you should look at SharedPreferences. These can be read and written to from code (see SharedPreferences.Editor), with or without actually creating a preferences GUI for your application. Save whatever values you need to save in onPause(), and read them back in onResume(). Note that the very first time you start up your app, there won't be any saved values so provide appropriate defaults if you don't find any saved values. - dave On Nov 14, 6:35 pm, Mark Murphy <mmur...@commonsware.com> wrote: > Huynh Ngoc Vu Nguyen wrote: > > > Hi all! > > > I have a game in android platform. I want to implement pause game > > function but I don't known stop current threat and resume it when re-play. > > Please help me solution! > > You could use a semaphore: > > http://developer.android.com/reference/java/util/concurrent/Semaphore... > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android Development Wiki:http://wiki.andmob.org -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en