question

LucaxsTeixeira-6019 avatar image
0 Votes"
LucaxsTeixeira-6019 asked AminDodin-1022 answered

How to use the camera of xamarin forms without extensions?

I want to know how to use camera without extensions in xamarin forms because I cannot use it.

dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

alessandrocaliaro avatar image
0 Votes"
alessandrocaliaro answered

Extensions means plugin?

There is a camera view in Xamarin community toolkit

Otherwise you have to implement a view in the platform specific project and call it from XF

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ColeXia-MSFT avatar image
0 Votes"
ColeXia-MSFT answered ColeXia-MSFT edited

Hello,

Welcome to Microsoft Q&A!

As alessandrocaliaro mentioned above , Xamarin.Forms does not provide camera API , We have to implement it on each platform .

There is an article demonstrates how to implement a View with custom renderer .

75683-screenshots.png

Note : It's better to test on real device (iOS simulator does not support camera) .




If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


screenshots.png (182.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AminDodin-1022 avatar image
0 Votes"
AminDodin-1022 answered

You might not be forced to write different implementations for iOS and Android. The company I work for has a Xamarin Camera Control that’s part of the LEADTOOLS SDKs. It provides a common camera API which gives you control over Android and iOS camera functions.

This means you don’t have to write native code for each device platform.

If you would like to try it, there’s a fully-functional free evaluation you can download.

If you download the full evaluation, it will install source code for several demo programs, including this one:

[LEADTOOLS folder]\Examples\Xamarin\CameraDemo

There is also free technical support through email and chat, in case you need help using the LEADTOOLS control.

This is a screenshot from the Xamarin camera demo:
80882-xamarincamerademo1.png





5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.