我正在编写一个 android 应用程序,想知道是否有办法将Movie
对象保存到内部存储中?
我想我必须以Movie
某种方式获取对象的字节,但我不确定......我通过方法创建了对象decodeStream
......
亲切的问候马克
我正在编写一个 android 应用程序,想知道是否有办法将Movie
对象保存到内部存储中?
我想我必须以Movie
某种方式获取对象的字节,但我不确定......我通过方法创建了对象decodeStream
......
亲切的问候马克
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