I'm interested i开发者_如何学Cn capturing media to use in my activity in two ways:
1) capturing immediately from the supplied app. (like Using the camera activity in Android)Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); this.startActivityForResult(camera, PICTURE_RESULT);2) browse a picture/video/audio gallery and pick from the list. I notice I can call up for the photo gallery
Intent intent = new Intent(Intent.ACTION_VIEW, target); startActivity(intent);But how about for video only? audio only? How will I get the URI from any of them?
a FEW problems, you need to do startActivityForResult..
But just take a look at this post, its already been done by lots of people.
Android ACTION_IMAGE_CAPTURE Intent
精彩评论