0

I am using Coonction class to link with url....... now further how It would be access in main, dwonload and then save in my SD card any one can help me

public class Connection {

    private InputStream in;

        public InputStream conn(String Link) throws IOException
        {

            URL url=new URL(Link);

            URLConnection c=url.openConnection();

            in = c.getInputStream();

            return in;
        }

    }
Mayuri
  • 408
  • 6
  • 13
  • You mean you want to download a video from URL in the background using thread? can you please explain for what purpose you want to use handler to make your question more clear. – Saqib Vohra May 10 '14 at 05:04
  • Why not Mr Saqib Vohra.......I want to download video in new thread when this thread finish its downloading It response to main thread with the help of Handler – user3622538 May 10 '14 at 05:31
  • http://stackoverflow.com/questions/5472226/how-to-save-file-from-website-to-sdcard have a look at this solution. Call this method in a thread and when the while loop is finished, use handler to notify download complete. – Saqib Vohra May 10 '14 at 05:37

0 Answers0