0

我正在编写一个 android 应用程序,想知道是否有办法将Movie对象保存到内部存储中?

我想我必须以Movie某种方式获取对象的字节,但我不确定......我通过方法创建了对象decodeStream......

亲切的问候马克

4

1 回答 1

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

于 2014-08-23T12:48:43.697 回答