简体   繁体   中英

How to use existing camera app(not create one using MediaCapture) and take picture in windows phone 8.1(WinRT)?

I know how to implement a camera capture using a MediaCapture in windows phone 8.1. But the question is can't we just launch the existing camera app using a launchUriAsync() and get back the path of the file or the file itself in the form of an argument?

Example: Like when we try using a import and choose the photos app we have an option to take an image. Can't we use the existing camera app to do this? Should we really have to implement our own media capture with resolution etc?

Thanks.

The app needs to use the MediaCapture API.

Windows Phone Runtime apps cannot directly launch the camera app to capture and return an image. There is no analogous API to CameraCaptureTask (Windows Phone Silverlight) or CameraCaptureUI (Windows Store apps).

can't we just launch the existing camera app using a launchUriAsync() and get back the path of the file or the file itself in the form of an argument?

In Windows 10 it would be possible for somebody to write a camera app service that provides this, but not in 8.1.

See the build session App-to-App Communication: Building a Web of Apps

Should we really have to implement our own media capture with resolution etc?

http://wpdev.uservoice.com is the place to request features for the Windows Dev Platform.

With Windows 10 you should be able to use the CameraCaptureUI API to capture a picture without having to write your own media capture code. Details of this API can be found here: https://msdn.microsoft.com/en-us/library/windows/apps/windows.media.capture.cameracaptureui.aspx .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM