0

I'm writing an android application and wondered if there is a way to save a Movie object to the internal storage?

I think I have to get the bytes of the Movie object somehow, but I'm not sure... I created the object via the method decodeStream...

Kind regards Marc

Rami
  • 7,879
  • 12
  • 36
  • 66
Marc Borni
  • 384
  • 1
  • 17

1 Answers1

0

Movie is a "stupid" object and you can't get the bytes from it. I would suggest downloading the movie to the local storage first and then creating the Movie object from the local file.

Basically you are getting the bytes from InputStream then you can save it to a file.

After you save the file you can open it using decodeFile function.

There are two main options to save files in android Internal / External storage you can read about them here:

This question deals with downloading a file (and showing progress as well):

Download a file with Android, and showing the progress in a ProgressDialog

Community
  • 1
  • 1
Raanan
  • 4,777
  • 27
  • 47