In my application, I make a TCP/IP Socket Connection. I run this Application on a HTC incredible S. But it needs very long and after a little while a dialog shows up, which says that my application doesn’t react. The Dialog offers me the options to “force a closing” or to “wait”. Then I choose “wait” and everything works fine and my HTC is connected.
The dialog doesn’t appear when I test the application on a Motorola Zoom, because it is much faster.
My question is, if there is a way to force my phone to wait longer so that no dialog appears?
Thanks
You should perform long operations on a background thread, and not on the UI (main) thread. Android provides some great solutions for it, where I think the most popular is AsyncTask.
Great articles to read about it are Painless Threading, and Designing for Responsiveness, which might also help.