[android-developers] Re: How to unregister listener after application get closed

2010-04-29 Thread zohar lerman
thanks On Apr 28, 5:42 pm, Mark Murphy mmur...@commonsware.com wrote: zohar lerman wrote: First thanks for your quick responses. Second I have few more questions 1. in your second suggestion is it possible ( and if yes how) to end the service later ( by user request) Call

[android-developers] Re: How to unregister listener after application get closed

2010-04-28 Thread zohar lerman
This is my temporary solution but i want to be able to listen the phone event even when the application is closed ( until the user will ask to stop the this service) On Apr 28, 4:44 pm, Anurag Singh anusingh...@gmail.com wrote: Why dont you put your code in OnDestry. like OnDestroy() {    

Re: [android-developers] Re: How to unregister listener after application get closed

2010-04-28 Thread Mark Murphy
zohar lerman wrote: This is my temporary solution but i want to be able to listen the phone event even when the application is closed ( until the user will ask to stop the this service) From your original post, you do not have a service. If you have a service, unregister the listener in

[android-developers] Re: How to unregister listener after application get closed

2010-04-28 Thread zohar lerman
Sorry for the misunderstanding but i am not using service. As i said in the initial post The Application contains one activity which includes 2 buttons ‘Start’ and ‘Stop’ On Apr 28, 5:02 pm, Mark Murphy mmur...@commonsware.com wrote: zohar lerman wrote: This is my temporary solution but i

Re: [android-developers] Re: How to unregister listener after application get closed

2010-04-28 Thread Mark Murphy
zohar lerman wrote: Sorry for the misunderstanding but i am not using service. As i said in the initial post The Application contains one activity which includes 2 buttons ‘Start’ and ‘Stop’ Right. You cannot, should not, and must not leave a listener attached after an activity ends. You

[android-developers] Re: How to unregister listener after application get closed

2010-04-28 Thread zohar lerman
First thanks for your quick responses. Second I have few more questions 1. in your second suggestion is it possible ( and if yes how) to end the service later ( by user request) 2. in your third suggestion is it possible to start the broadcast receiver by demand and the same question as in bullet

Re: [android-developers] Re: How to unregister listener after application get closed

2010-04-28 Thread Mark Murphy
zohar lerman wrote: First thanks for your quick responses. Second I have few more questions 1. in your second suggestion is it possible ( and if yes how) to end the service later ( by user request) Call stopService(). 2. in your third suggestion is it possible to start the broadcast