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 will leak memory and cause your users significant pain. Your options are: 1. Go with the earlier advice, unregister your listeners in onDestroy(), and do not "listen the phone event even when the application is closed" 2. Use a service, have the service have your listener, and have the service continue operating after the activities end 3. Listen for broadcast Intents for phone state changes, instead of using a listener -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Consulting: http://commonsware.com/consulting -- 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