rebuy-de / rb-forms-barcode

Rb.Forms.Barcode is a Xamarin.Forms view for scanning barcodes.
https://github.com/rebuy-de/rb-forms-barcode
MIT License
43 stars 21 forks source link

CancelAutoFocus and nuget problem #49

Closed guilherme-mantovani closed 8 years ago

guilherme-mantovani commented 8 years ago

When I try to scan a barcode in older cellphones there's an error with the camera AutoFocus. I've dowloaded the application and fixed this problem adding a simple try in the file master/Rb.Forms.Barcode.Droid/Camera/CameraConfigurator.cs line 75. e.g. try{ camera.CancelAutoFocus(); } catch (Exception e){ this.Debug(e.Message); } That solves the problem.

Another error is occuring in the last version of the nuget package. When the package is installed the nuget manager corrupts. I've fixed it too changing the nuspec to the folowing (I don't know where the error was).

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>Rb.Forms.Barcode</id>
    <version>0.6.5</version>
    <title>Barcode scanner plugin for Xamarin.Forms</title>
    <authors>Ota Mares</authors>
    <owners>reBuy reCommerce GmbH</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <licenseUrl>https://github.com/rebuy-de/rb-forms-barcode/blob/master/LICENSE</licenseUrl>
    <projectUrl>https://github.com/rebuy-de/rb-forms-barcode</projectUrl>
    <description>Rb.Forms.Barcode is a Xamarin.Forms view for scanning barcodes full of awesomeness and also unicorns. Please check the website for further details.

Beta notice: Now with experimental iOS support.</description>
    <summary>Rb.Forms.Barcode is a Xamarin.Forms view for scanning barcodes.</summary>
    <releaseNotes>0.6.5:
*Fix:in which the scanner sometimes crashes when locking/unlocking the device.

0.6.3-beta:
* Change: downgrade GooglePlayServices.Vision to 26.0.0.0

0.6.2-beta:
* Fix: handle camera permissions to prevent a crash
0.6.1-beta:
* Change: replace deprecated av orientation call

0.6.0-beta: 
* New: add iOS support.
* Public API should be nearly the same, only the config for iOS scanner is shorter than the Android config.</releaseNotes>
    <tags>barcode scanner scanning scan xamarin xamarin.forms googleplayservices vision gms rebuy unicorns</tags>
    <dependencies>
      <group>
        <dependency id="Xamarin.Forms" version="1.5.0.6447" />
      </group>
      <group targetFramework="MonoAndroid1.0">
        <dependency id="Xamarin.GooglePlayServices.Vision" version="26.0.0" />
      </group>
    </dependencies>
  </metadata>
</package> 
fvermeulen commented 8 years ago

Can you add a pull-request for that?

thanks

omares commented 8 years ago

related PRs #50 and #51

fvermeulen commented 8 years ago

autofocus-problem solved. Issue for nuspec problem is #52