如何存储视频在Android的? [英] How to store Video in Android?
本文介绍了如何存储视频在Android的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用下面的意图调用摄像头应用程序捕获视频。这是工作的罚款。但在的onActivityResult 我不知道如何将这种存储到一个文件中的 SD卡
。一些人能够给我一个样品来做到这一点。谢谢你。
意图cameraIntent =新意图(
android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
startActivityForResult(cameraIntent,CAMERA_VIDEO_REQUEST);
- 此外,我想表明我的应用程序的视频的preVIEW,然后,如果用户点击了preVIEW我需要一个视频播放器打开它。我可以得到一些很好的帮助。谢谢你。
解决方案
您可以使用MediaRecorder类来捕捉视频并在SD卡的地方存放。
请看看下面的链接,这可能会帮助你。
谢谢!
I use the below intent to call the camera application to capture video. This is working fine. But On the onActivityResult I am not sure how to store this into a file in SD card
. Can some one give me a sample to do this. Thank you.
Intent cameraIntent = new Intent(
android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
startActivityForResult(cameraIntent, CAMERA_VIDEO_REQUEST);
- Also I want to show a preview of the video in my application and then if the user clicks the preview i need to open it up in a video player. Can I get some help on that as well. Thank you.
解决方案
You can use the MediaRecorder class to capture video and store it somewhere in the sdcard.
Pls have a look at the link below which might help you
Android Video Recording Sample
Thanks!
这篇关于如何存储视频在Android的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文