0

I'm building a shared project and I want to access the camera. For now i'm just trying to get this to work on android.

I found this here in stackoverflow and it works but I'm not being able to put this to work in my project becouse I want to call the camera in a ContentPage and not in my Class App : Application.

Community
  • 1
  • 1
João Zão
  • 170
  • 1
  • 11
  • That would still work. You just put a button on your Page that calls the App.Instance.ShouldTakePicture() method – Jason Apr 29 '15 at 17:44
  • I tried this: `Command = new Command(o => App.Instance.ShouldTakePicture())` But i'm getting an error "The event 'MyNameSpace.App.ShouldTakePicture' can only appear on the left hand side of += or -= (except when used from within the type 'MyNameSpace.App')" – João Zão Apr 29 '15 at 18:33
  • I make it work after watching [this](http://stackoverflow.com/questions/253757/why-events-cant-be-used-in-the-same-way-in-derived-classes-as-in-the-base-class) – João Zão Apr 29 '15 at 19:25

1 Answers1

0

I would recommend this library for that: http://components.xamarin.com/view/xamarin.mobile

Adam Ivancza
  • 2,459
  • 1
  • 25
  • 36