When a progress dialog is displaying and we press search hard key it closes and moves to search bar of phone, even if if the progress Dialog setcancellable value is set false.
how can we avoid this?
When a progress dialog is displaying and we press search hard key it closes and moves to search bar of phone, even if if the progress Dialog setcancellable value is set false.
how can we avoid this?
There is no need to avoid this. You can not forbid the user to leave your app. He will always be able to press the home key to go back and send your Application in the background. If you have a running notcancelable dialog the user will get back to this activity at the moment he reenters your app. You have to build your app in a way that it will work even if the app is send to the background and revisited later.