Back to project page NASAImageOfTheDay.
The source code is released under:
MIT License
If you think the Android project NASAImageOfTheDay listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.parser; //from ww w. j a v a 2s .c o m import android.graphics.Bitmap; import android.os.AsyncTask; public class GetImageInBackground extends AsyncTask<String, Void, Bitmap> { String imageUrl; public ReturnFromBackgroundTask deligate = null; public GetImageInBackground(String mImageUrl) { imageUrl = mImageUrl; } @Override protected Bitmap doInBackground(String... params) { IotdHandler imageHandler = new IotdHandler(); Bitmap image = imageHandler.getBitmap(imageUrl); return image; } @Override protected void onPostExecute(Bitmap result) { super.onPostExecute(result); deligate.responseImageFromBackground(result); } }