0
0
mirror of https://github.com/markusfisch/BinaryEye.git synced 2024-09-20 03:52:16 +02:00
Commit Graph

1237 Commits

Author SHA1 Message Date
Markus Fisch
50e57eaf25 Expand escape sequences in encoding input
So escape sequences can be used when encoding a barcode.
2023-04-24 23:14:58 +02:00
Markus Fisch
340f7f9d1d Remove lateinit for BT members
And use safe calls (?.) instead of catching the NullPointerException.

If something can be null, we should use the appropriate type for it
to make things explicit.
2023-04-19 21:13:05 +02:00
Unknownman820
a42bd793bb
Update Taiwan translation 2023-04-04 08:56:49 +02:00
KamaleiZestri
6e531f5395
Fix crash when not connected to a Bluetooth server 2023-03-29 12:06:20 +02:00
Markus Fisch
79b3fddcf8 Set BT results from return values
So the result variables can be immutable.

And use simpler terms for their names to make this easier to
read and understand.
2023-03-28 21:28:22 +02:00
Markus Fisch
09f3c8f193 Use "when" instead of "if/else"
More Kotlin idiomatic.

Also use full words instead of abbreviations for clarity.
2023-03-28 21:26:37 +02:00
Markus Fisch
5f82f216fd Advance version number to 1.60.1 2023-03-27 22:11:43 +02:00
Markus Fisch
8424e3ea31 Add Bluetooth permissions to PRIVACY
And explain why these are required.
2023-03-27 22:05:31 +02:00
Markus Fisch
15ce34aa92 Add legacy Bluetooth permissions for SDK < 12
According to the docs, BLUETOOTH and BLUETOOTH_ADMIN are required
for Android versions below SDK 31.

See:
https://developer.android.com/guide/topics/connectivity/bluetooth/permissions
2023-03-27 22:02:09 +02:00
Markus Fisch
8dfc1e37c0 Assign sendScanBluetooth properly
getBoolean() returns the current value.
2023-03-27 21:41:42 +02:00
Markus Fisch
a0d3b7ba87 Catch SecurityExc when BT permission is missing
Make sure not to crash the app because the bluetooth permission is
missing. The app should gracefully handle this situation. It's
perfectly okay when the app doesn't have the permission to use
bluetooth. This is really a very niche use-case.
2023-03-27 19:04:39 +02:00
Markus Fisch
a234dc3a9a Only ask for BT permission on activation
Doesn't make sense to ask for permssion when we deactivate bluetooth.

Also simplify this code a bit.
2023-03-27 19:04:39 +02:00
Markus Fisch
a00f70e25b Check bluetooth permission before using API
Without this check, the app will crash as soon as the PreferencesFragment
is initialized when the user didn't already grant Bluetooth permission.

Always make sure to check the permissions.
2023-03-27 21:17:30 +02:00
Markus Fisch
ef555c0153 Disable bluetooth sending by default
This is a pretty niche use-case and so it should be disabled by
default. Especially because it requires runtime permissions.
2023-03-27 21:14:37 +02:00
Markus Fisch
9fffb53f73 Remove stray character from Italian translation 2023-03-16 23:05:13 +01:00
bovirus
b82c6200c0
Update italian language 2023-03-16 23:03:16 +01:00
solokot
5bb347c392
Update Russian translation 2023-03-16 18:34:30 +01:00
bovirus
f8033614fa
Update italian language 2023-03-16 00:23:21 +01:00
Markus Fisch
46cc2fb1a1 Make showResult an extension of Activity
And remove all the "activity." prefixes.
2023-03-15 20:57:10 +01:00
Markus Fisch
f2ac1e77bb Update gradle wrapper 2023-03-15 20:53:18 +01:00
Markus Fisch
89c84880c6 Update Kotlin version 2023-03-15 20:52:58 +01:00
Markus Fisch
352fe07850 Remove useless class wrapping for BluetoothSender
Since all members and properties are static so it's more idiomatic
to make them simple top-level functions.
2023-03-15 20:51:38 +01:00
Markus Fisch
00abe33314 Add new string resources to translations
Otherwise lint will fail.
2023-03-15 20:37:30 +01:00
Markus Fisch
142df25d7e Only check BLUETOOTH_CONNECT on Android S+
This symbol doesn't exist before Android S.
2023-03-15 20:31:01 +01:00
Markus Fisch
021d775835 Clean up new additions
Fix indent, apply auto format, remove commented out code, etc.
2023-03-15 20:29:44 +01:00
KamaleiZestri
06df0c4d64
Support sending scans via bluetooth
Makes it possible to send scanned codes to a bluetooth device.

Should work with any bluetooth receiver that shares it's UUID
of "8a8478c9-2ca8-404b-a0de-101f34ab71ae".
2023-03-15 12:09:06 +01:00
Markus Fisch
32c70af812 Remove plural for one for Korean translation
Because lint tells me it's not required for Korean.
2023-03-01 21:42:10 +01:00
Markus Fisch
7cc1777e7a Add barcode_info plurals for polish translation
With the default strings, silly enough.

Otherwise Lint will throw an error (!) because these plurals
are missing.

Now, I doubt I will ever meet the person who thought it would
be wise to throw an error if a plurals tag is missing in a
translation, but I sure hope this person will learn to make
better decisions some day.
2023-03-01 21:36:45 +01:00
Anthony Ryan
23e0564594
Losslessly compress PNG images
Using Efficient-Compression-Tool we can reduce the size by 254.17KB (15.8405%)
without changing visual appearance.
2023-03-01 21:29:50 +01:00
Markus Fisch
0447384bea Update tools and gradle wrapper 2023-03-01 12:09:59 +01:00
Markus Fisch
b4d66e28e2 Fix resolving EC level letter for recreation
While ZXing C++ reports the QR Code error correction level with four
letters (following the spec), it expects the level for encoding as an
integer in a range from 0 to 8.
2023-02-28 21:09:52 +01:00
Markus Fisch
ee1c56d99f Update ZXing C++ wrapper 2023-02-23 20:03:04 +01:00
Markus Fisch
33ef78443e Advance version number to 1.59.0 2023-02-22 18:37:57 +01:00
Markus Fisch
9f1e34b06d Add setting error correction for AZTEC/PDF417 too
Because ZXing C++ supports setting an error correction level for
these formats too.
2023-02-20 20:04:01 +01:00
Markus Fisch
24766f55d4 Fix setting error correction level for QR Codes
ZXing C++ expects the error correction level to be in a range from
0 to 8, so the four possible values for QR codes need to be translated
into this range.
2023-02-19 18:59:11 +01:00
Markus Fisch
0ae7d080e3 Add missing changelogs for F-Droid 2023-02-09 22:22:05 +01:00
Markus Fisch
7d8c6016db Optimize monochrome launcher icon with avocado 2023-02-09 22:19:37 +01:00
KamaleiZestri
3d923035e3
Follow beep settings for error beeps too 2023-02-06 10:18:52 +01:00
Markus Fisch
a489f3aa22 Remove finishing string resource
And show the more generic `camera_error` message instead.

This message makes no sense anymore now that the app isn't
finished.
2023-02-05 20:30:55 +01:00
Markus Fisch
7dfd7a1303 Remove finishing activity if camera is unavailable
While the camera is the main feature of the camera acitvity,
there are other features that are still useful even if the
camera is not available.

So it's better not automatically finish the camera activity
but let the user decide.
2023-02-05 18:03:32 +01:00
Markus Fisch
9abc01fc4f Advance version number to 1.58.2 2023-01-31 12:36:32 +01:00
Markus Fisch
d10a33c1b7 Check string is not empty before calling last()
Because `String.last()` will throw a NoSuchElementException when
the string is empty.
2023-01-31 10:51:18 +01:00
Markus Fisch
357b2b5d59 Advance version number to 1.58.1 2023-01-31 10:51:18 +01:00
Markus Fisch
dfd64405da Fix design of monochrome launcher icon
Monochrome icons don't use any color, not even black or white.
2023-01-30 18:41:56 +01:00
Markus Fisch
045daf9deb Remove committing preferences
This made only sense when this app used RenderScript, which could
cause the app to crash before settings were saved.
2023-01-25 20:31:11 +01:00
Tom Xin
46b9ef516c
Update zh-rCn translation 2023-01-21 20:52:19 +01:00
Markus Fisch
0265909fd7 Advance version number to 1.58.0 2023-01-19 20:28:25 +01:00
Markus Fisch
ceef92bb7c Alternate binarizers to improve detection
By default, ZXing uses LOCAL_AVERAGE, but this does not work well
with inverted barcodes on low-contrast backgrounds.

Of course, it would be better to improve ZXing's HybridBinarizer
(which is used for LOCAL_AVERAGE), but this is not trivial.
2023-01-19 20:16:49 +01:00
Markus Fisch
46785bab01 Update ZXing C++ wrapper for DecodeHints
The latest version makes all native `DecodeHints` available
to the JVM.
2023-01-19 20:12:54 +01:00
Markus Fisch
ccbb0f9e8a Fix terminating string tag in italian translation 2023-01-19 18:01:27 +01:00