Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

Fix camera selection in Android. #231

Merged
merged 5 commits into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug]"
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Logs**
If applicable, add the verbose output of `flutter run`.

**Environment (please complete the following information):**
- [ ] iOS? Version: ...
- [ ] Android? Version: ...
- [ ] Real Device? Which?: ...
- [ ] Emulator/Simulator? Which?: ...
- Version of `barcode_scan`
- Output of `flutter --version`:
```
Flutter ...
```

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature Request]"
labels: Feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
2 changes: 2 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The `BarcodeScan.scan()` method returns a [`ScanResult`](./lib/model/scan_result
The barcode is stored in `ScanResult.rawContent`
Check your calls to this method and read the barcode from the `rawContent` property.

If your project uses pre Flutter 1.12 you need to update Flutter in your App: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects


# Upgrade from 1.0.0 to 2.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ class BarcodeScannerActivity : Activity(), ZXingScannerView.ResultHandler {
super.onResume()
setupScannerView()
scannerView?.setResultHandler(this)
scannerView?.startCamera()
if (config.useCamera > -1) {
scannerView?.startCamera(config.useCamera)
} else {
scannerView?.startCamera()
}
}
// endregion

Expand Down Expand Up @@ -151,4 +155,4 @@ class BarcodeScannerActivity : Activity(), ZXingScannerView.ResultHandler {

return types
}
}
}