Skip to content

Commit

Permalink
Add Binary Eye barcode scanner support (fixes #325) (#339)
Browse files Browse the repository at this point in the history
* Add Binary Eye barcode scanner support (fixes #325)

* Remove "Barcode Scanner" app as preferred choice (fixes #325)

* Add app recommendation: "Binary Eye"

* Imported de translation

* Updated whatsnew
  • Loading branch information
Catfriend1 authored Feb 24, 2019
1 parent 92a77dc commit c6cf442
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,15 @@ private void onCopyDeviceIdClick() {
}

private void onQrButtonClick() {
final List<String> targetApplications = list(
"de.markusfisch.android.binaryeye", // Binary Eye
"com.srowen.bs.android", // Barcode Scanner+
"com.srowen.bs.android.simple" // Barcode Scanner+ Simple
// "com.google.zxing.client.android" // Barcode Scanner (2019-02-24: no longer on GPlay)
);
IntentIntegrator integrator = new IntentIntegrator(DeviceActivity.this);
integrator.setTargetApplications(targetApplications);
integrator.setMessage(getString(R.string.install_barcode_scanner_app_message));
integrator.initiateScan();
}

Expand Down Expand Up @@ -721,4 +729,8 @@ private void onDeviceIdViewClick(View view) {
mDiscoveredDevicesTitle.setVisibility(View.GONE);
mDiscoveredDevicesContainer.setVisibility(View.GONE);
}

private static List<String> list(String... values) {
return Collections.unmodifiableList(Arrays.asList(values));
}
}
1 change: 1 addition & 0 deletions app/src/main/play/en-GB/whatsnew
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Enhancements
* Add Binary Eye barcode scanner support (#325)
* Download Support Bundle (#332)
* Add label to explain why Syncthing Options are greyed out (#337)
Notes
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ Bitte melden Sie auftretende Probleme via GitHub.</string>
<!-- Content description for device ID qr code icon -->
<string name="scan_qr_code_description">QR Code scannen</string>

<!-- Dialog message if no compatible barcode scanner app is installed -->
<string name="install_barcode_scanner_app_message">Dies erfordert eine Barcode Scanner App. Möchtest Du die App \'Binary Eye\' von F-Droid installieren?</string>

<!-- Toast show if we could not get root permissions -->
<string name="toast_root_denied">Konnte keine Root-Rechte erhalten.</string>

Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ Please report any problems you encounter via Github.</string>
<!-- Content description for device ID qr code icon -->
<string name="scan_qr_code_description">Scan QR Code</string>

<!-- Dialog message if no compatible barcode scanner app is installed -->
<string name="install_barcode_scanner_app_message">This requires a barcode scanner app. Would you like to install the app \'Binary Eye\' from F-Droid?</string>

<!-- Toast show if we could not get root permissions -->
<string name="toast_root_denied">Did not get root permissions</string>

Expand Down

0 comments on commit c6cf442

Please sign in to comment.