I wrote application that contain 2 activities.
In the first one – i need to give the user the option to choose image from the gallery and i send this image to some server.
The Server return some result – and if the result is OK i need to show the second activity.
The problem that i have ..
-
when sending the image – i see that the screen is become black …
I want to avoid this and show some nice GUI of ‘please wait’ – how can i do it ? -
i want to make this sending image to the server to be from other thread – how can i do it from android ? how to define new thread with callback that will be called when the thread is done ?
Thanks for any help.
For question number 1:
You should use a
ProgressDialogor aProgressBarin order to show to the user that an operation is being executed. For more information you can check here: http://developer.android.com/reference/android/app/ProgressDialog.htmlFor question number 2:
A good solution would be to use
AsyncTaskfor this operation which gives you a set of callback functions to control the operation. For more information you can check here: http://developer.android.com/reference/android/os/AsyncTask.htmlHope this helps for now!