I have been developing application on that I got two activity.
first Activity Called Second to get Download url.
In OnActivityResult
function of first Activity.there is a ProgressDialog
that shows that status of image downloading using that url.
Problem is progress dialog not been shown in that activiy.
protected void onActivityResult(int requestCode, int resultCode, Intent imagePicked)
{
super.onActivityResult(requestCode, resultCode, imagePicked);
if(resultCode==RESULT_OK)
{
ProgressDialog progressDialog=ProgressDialog.show(this, "", "Loading Image");
switch(requestCode)
{
case CharacterSelector.GetFaceBookImage:
//Toast.makeText(this, "onFacebookimageresult", Toast.LENGTH_SHORT).show();
String ImageUrl=imagePicked.getStringExtra("DownloadLink");
WebService getImage=new WebService(ImageUrl);
Log.d("Selected Img url", ""+ImageUrl);
InputStream inputStream;
try
{
inputStream = getImage.getHttpStream(ImageUrl);
getImage=null;
Bitmap bitmap=BitmapFactory.decodeStream(inputStream);
inputStream=null;
mybitmapDrawable=new BitmapDrawable(bitmap);
addImageUserImage(mybitmapDrawable.mutate());
progressDialog.dismiss();
bitmap=null;
}
catch (IOException e)
{
//Show server Error message:
e.printStackTrace();
}
break;
Regards, Kariyachan