AbsoluteSith
AbsoluteSith

Reputation: 1967

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.

Upvotes: 2

Views: 814

Answers (2)

aruntalkstech
aruntalkstech

Reputation: 151

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.

Upvotes: 0

Rob Caplan - MSFT
Rob Caplan - MSFT

Reputation: 21919

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.

Upvotes: 1

Related Questions