Possible Duplicate:
controll thread through button
i am make a application that require the GPS location and some other resources. i get the GPS location accurately but the problem is we use the three buttons that is (start, stop and pause) and i want to work the threads like these buttons if i press the start button thread start if i pause thread pause if i press stop then stop the threads. i am utilize by-default GPS demo example. if require code i will send it.