Rich
Rich

Reputation: 4207

What's good way to display a start up message in an Android app?

All,

I'm developing an Android application that connects to other hardware on start up via TCP (over WiFi) . I'm pretty happy with the software that handles the connection -- it does a good job of establishing the socket connection as well as handling things when the connection is unexpectedly lost.

Unfortunately, my application currently just displays a blank, empty screen until the connection is established, and I expect that this sort of thing may produce unwarranted worry on the part of my users.

I can't figure out how to put up a start-up message informing the user that I have a towel and that there's no need to panic. Can anybody point me to a method for accomplishing this? I'll be happy with just about anything that's legible, whether graphical or textual.

Thanks, R.

Upvotes: 0

Views: 369

Answers (3)

techi.services
techi.services

Reputation: 8533

You could use a ProgressDialog. http://developer.android.com/reference/android/app/ProgressDialog.html

Upvotes: 0

Heikki Toivonen
Heikki Toivonen

Reputation: 31130

Do the networking in AsyncTask (another thread, so it won't block the UI). Then you can display all kinds of progress indicators in the UI.

Upvotes: 1

Chris Stratton
Chris Stratton

Reputation: 40347

Whatever you choose, you need to get the startup screen displayed and more importantly start responding to UI events before the TCP connection is made - ie, you shouldn't do the TCP connection attempt on the UI thread, as if it takes longer than expected you may get an application not responding error.

Upvotes: 1

Related Questions