开发者

How do I use the android media services to return that media to my activity?

开发者 https://www.devze.com 2022-12-21 07:40 出处:网络
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)

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

0

精彩评论

暂无评论...
验证码 换一张
取 消