DefaultCamera,AllowCropping is not working in xam plugin how can i resolve.

Ajay87Ajay87 INMember ✭✭

Xam plugin is not working properly in xamarin forms, i need to open only rear camera.

Best Answer

  • JGoldbergerJGoldberger US Xamurai
    edited June 2018 Accepted Answer

    @Ajay87

    I just tested this and it worked as expected on iOS. Android does not seem to support cropping, as per the README for the plugin:

    Allow Cropping

    Both iOS and UWP have crop controls built into the the camera control when taking a photo. On iOS the default is false and UWP the default is true. You can adjust the AllowCropping property when taking a photo to allow your user to crop.

    And there is also a note that the Default Camera may not work on Android:

    Default Camera

    By default when you take a photo or video the default system camera will be selected. Simply set the DefaultCamera on StoreCameraMediaOptions. This option does not guarantee that the actual camera will be selected because each platform is different. It seems to work extremely well on iOS, but not so much on Android. Your mileage may vary.

    Is this what is happening for you, IOW are you testing on Android?

    Also moving this thread to Libraries, Components, and Plugins.

Answers

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    What is happening? Can you be more specific?

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai
    edited June 2018 Accepted Answer

    @Ajay87

    I just tested this and it worked as expected on iOS. Android does not seem to support cropping, as per the README for the plugin:

    Allow Cropping

    Both iOS and UWP have crop controls built into the the camera control when taking a photo. On iOS the default is false and UWP the default is true. You can adjust the AllowCropping property when taking a photo to allow your user to crop.

    And there is also a note that the Default Camera may not work on Android:

    Default Camera

    By default when you take a photo or video the default system camera will be selected. Simply set the DefaultCamera on StoreCameraMediaOptions. This option does not guarantee that the actual camera will be selected because each platform is different. It seems to work extremely well on iOS, but not so much on Android. Your mileage may vary.

    Is this what is happening for you, IOW are you testing on Android?

    Also moving this thread to Libraries, Components, and Plugins.

  • Ajay87Ajay87 INMember ✭✭

    @JGoldberger Thanks, I've read all documentation of this plugin. It seems to work extremely well on iOS, but not so much on Android.

Sign In or Register to comment.