Posts

Showing posts from December, 2016

Android Video download using AsyncTask

Hi, Today I go to explain how to download any video and save it on device using asynctask. Here I write a taskhandler class for this one Create an interface which will handle the result of a downloaded video path from your device. public interface VideoInterface {    public void VideoResponse(String response,String filename); } Now below code is for the Taskhandle for the video downloading import java.io.BufferedInputStream; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import android.app.ProgressDialog; import android.content.Context; import android.os.AsyncTask; import android.view.WindowManager; import android.widget.ImageView; import android.widget.TextView; import com.package_name .activities.R; import com.package_name .VideoInterface; public class VideoTaskHandler extends AsyncTask<String, Str