-2

I have an application to let user to view video directly from my website. How can I create the sources and give the option for user to view it online or download it for offline view? Any help would be appreciate

Adam
  • 7
  • 2

1 Answers1

1

For your download you will need:

  • URLConnection
  • InputStream
  • OutputStream

It's best if you do it in a new thread (async).

Here's an example: Link

For the save directory, use 'Environment .getExternalStorageDirectory().toString()' like in the example.

Community
  • 1
  • 1
user3218281
  • 133
  • 8