Morten J Petersen
Morten J Petersen

Reputation: 233

Embedded camera in Xamarin Forms

I have a client that adamantly insists on a solution with embedded camera in terms of having a ContentPage with an camera stream and custom buttons and icons, similar to https://github.com/pierceboggan/Moments, or at very least as I understand it seeing as it is a Snapchat clone. And my client wants similar swipe capabilities as to how navigation works in Snapchat. However, as far as I can tell most of what is utilized in that solution has been deprecated.

I have suggested using the Media Plugin https://github.com/jamesmontemagno/MediaPlugin but they're not satisfied with the camera being pushed on the stack.

I've looked into implementing it natively and using dependency injections but it appears to be an overwhelming amount of work just to implement the most basic functions, particularly for Android's Camera2.

I'm hoping someone can provide me with good news of an easier alternative or an alteration to either Moments or Media Plugin or anything similar that will facilitate the requirements or if my only option is time consuming and complex?

Upvotes: 0

Views: 912

Answers (2)

Json
Json

Reputation: 1704

You could try this example which use custom renderer to add a take photo button and switch camera button on the camera view. Which is able to use on iOS and Android platform.

Main Page:

Main Page

Camera View with custom button page:

Camera View with custom button page

Upvotes: 0

Daniel
Daniel

Reputation: 9521

From the code of Moment, you can do what you want to achieve. I did this for iOS.

You will have to create a custom renderer to display the camera page. You will be able to add buttons on top of it.

Upvotes: 0

Related Questions