我們有一個要求從谷歌+/picasa下載視頻並將其存儲到SD卡。 你能請任何人幫我解決這個問題嗎? 谷歌+/Picasa中視頻從谷歌+/picasa下載android
將從URI
到byte[]
,然後byte[]
保存到文件:
InputStream videoStream = getActivity().getContentResolver().openInputStream(videoUri);
byte bytes[] = ByteStreams.toByteArray(videoStream);
videoFile = new File("abcd.mp4");
FileOutputStream out = new FileOutputStream(videoFile);
out.write(bytes);
out.close();
請告訴我們你到目前爲止所嘗試過的。 – Vishwanath
請檢查編輯後的代碼。現在視頻存儲在SD卡中,但沒有播放...... :( – Krishna