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

620 Commits

Author SHA1 Message Date
Markus Fisch
8875937022 Provide RenderScript context in PreprocessorTest
The RenderScript context is no longer created by Preprocessor
but must be provided.
2020-11-18 22:08:52 +01:00
Markus Fisch
3d33f62d7b Use Error Correction Level only for QR Codes
Of course. Other codes may or may not have different error
correction levels.
2020-11-18 22:05:42 +01:00
Markus Fisch
a4050cbf8f Update build tools version 2020-11-18 21:23:29 +01:00
Markus Fisch
abb362230e Put images with transparent pixels on white/black
So the barcode can be scanned even if an image contains transparent
pixels.

To do this, a reduction kernel is used to find out if an image has
transparent pixels and if it's dominant light or dark. Then, the
image is put on the opposite background color to maximize contrast.

This commit also make the RenderScript context a property of the
Activity rather than the processing object/function because there
can be only one RenderScript alive at any moment. So it's better
to bind it to the Activity.
2020-11-18 21:11:44 +01:00
Markus Fisch
967cab9c7b Remove translation restrictions from image to scan
So every part of the image can be moved into the region of
interest (which is always in the center of the screen).
2020-11-16 19:53:58 +01:00
Markus Fisch
c8d7be95e9 Use cropping limiter for scanning in images too
So it's possible to restrict scanning to a non-square section of
the image. Especially useful for barcodes that are more rectangular
than square.

Right now, the handling of the cropping limiter is exactly the same
as it is when scanning with the camera: The region of interest (ROI)
is always centered on the screen. A user is supposed to move the
image with the barcode using the well-known pinch and zoom gesture.

While this should work in most cases, it's possible that a barcode
at the far edge of an image can't be moved to the center of the
screen because of ScalingImageView's move restrictions.

There are two options: either make the ROI freely moveable on the
screen or remove the move restrictions from ScalingImageView.
2020-11-16 11:22:52 +01:00
Markus Fisch
18146ec41a Set error correction level when creating QR Codes
As requested.
2020-11-08 18:52:33 +01:00
Markus Fisch
5cd6114ba1 Add adaptive icons for shortcuts 2020-11-01 17:56:00 +01:00
Markus Fisch
8a310a1144 Replace background of adaptive icon with a color
Much simpler.
2020-11-01 17:24:18 +01:00
Markus Fisch
afc597ab90 Support setting a custom deviating locale
As requested.

In some countries and languages the translations of apps are really
bad or even non-existent, so people there use their devices set to
English. This setting makes it possible to use a deviating locale
for Binary Eye only, when there is a good translation, while keeping
the system set to English.
2020-11-01 17:09:42 +01:00
Markus Fisch
6d742c4d19 Use Gradle wrapper with sources
So it's easier to peek into it.
2020-10-18 14:20:32 +02:00
Markus Fisch
1776559d40 Save PNG for sharing on IO dispatcher 2020-10-18 14:13:32 +02:00
Markus Fisch
75c1eb6b64 Pick MIME type when sharing a new barcode too
So a barcode can be saved *and* shared as PNG, SVG or plain text.
2020-10-18 14:08:49 +02:00
Markus Fisch
c5cffc00c3 Add exporting barcodes in text form
As requested.
2020-10-17 17:43:02 +02:00
Markus Fisch
c0153e822c Update tools version and gradle wrapper 2020-10-17 17:40:05 +02:00
Sergiy Stupar
f070269c2c
Fix typo in Ukrainian translation 2020-10-06 10:03:03 +02:00
Sergiy Stupar
3e8df89db1
Add Ukrainian translation 2020-10-05 13:32:11 +02:00
Markus Fisch
56237c43cd Update to SDK 30 / Android 11 2020-10-03 16:59:22 +02:00
Markus Fisch
7fc565ae67 Replace resource reference with color literal
Because resource references don't work on API < 21.
2020-10-03 16:25:21 +02:00
Markus Fisch
656c1e36a8 Update Kotlin version 2020-10-03 16:20:21 +02:00
emintufan
42a6043f63
Add Turkish translation 2020-09-30 09:24:23 +02:00
Markus Fisch
6a5fdae584 Explain requested permissions in privacy policy 2020-09-28 11:24:07 +02:00
Giorgi Abulashvili
899deb77b5 Add Georgian translation 2020-09-25 15:00:39 +02:00
zmni
3419194bfd
Update Indonesian translation 2020-09-07 21:41:25 +02:00
dmitriy-ilchenko
3b55d48f65
Update Russian translation 2020-08-17 21:56:31 +02:00
Markus Fisch
d34673ddc3 Use different URL hints for open/send URLs
While the ".../?content=" part is required for Open-With-URLs,
it's confusing for Send-Scan-URLs.
2020-08-15 13:37:22 +02:00
unbranched
242bf4c0a1
Update Italian translation 2020-08-13 19:15:24 +02:00
Markus Fisch
ed2a12eef8 Update screenshots 2020-08-11 20:30:36 +02:00
Markus Fisch
4dd5c12e85 Add missing changelogs for F-Droid 2020-08-11 20:00:43 +02:00
Markus Fisch
d3fae01786 Update Simplified Chinese translation 2020-08-11 20:00:04 +02:00
Markus Fisch
37b6e6f832 Update version code to upload new build
Because building with the NDK still doesn't work for all Android
versions :(
2020-08-08 15:37:32 +02:00
Markus Fisch
e3274fd065 Advance version number to 1.34.0 2020-08-07 14:34:05 +02:00
Markus Fisch
c75b9f73ab Enable R8 and BLAS mode explicitly
Makes building app bundles finally work for Android 7+.

For Android 6 and lower, app bundles are still broken - but an APK
still works!

With R8 and build tools 4.0.1, we can also build on macOS Catalina
again, even when an NDK is available. So hopefully, this commit
should also fix builds by F-Droid where we cannot disable the NDK
(for details see issue #111).
2020-08-07 14:12:59 +02:00
Markus Fisch
1432669aee Add an option to send JSON in POST request 2020-08-06 14:57:38 +02:00
Markus Fisch
00a8a94b59 Add a setting to choose type of background request
Now, the app can do
* simple GET requests where the scanned data is just appended to
whatever URL is given
* GET requests with all available data fields as URL encoded query
parameters
* POST requests with all available data fields in content type
application/x-www-form-urlencoded
2020-08-05 18:22:47 +02:00
Markus Fisch
c8c3da91ae Make hexDump() private in DecodeFragment
It's only ever used there and we can always make it public should
this ever change.
2020-08-05 10:57:57 +02:00
Markus Fisch
8cbc73b7f8 Use CoroutineScope in place
And remove explicit value. This code doesn't get any clearer
by using an explicit value.
2020-08-05 10:55:58 +02:00
Markus Fisch
941d875b3e Show an error when background request fails
The app shouldn't be silent if a background request fails.
2020-08-05 10:53:14 +02:00
Markus Fisch
1ac578845e Use a custom preference dialog for URL settings 2020-08-04 17:49:02 +02:00
Markus Fisch
e816e8bf89 Migrate preferences to PreferenceFragmentCompat
To get proper Material Design preferences. Long overdue.
2020-08-03 18:07:00 +02:00
Markus Fisch
54c368fcd8 Update tools version 2020-08-03 18:06:30 +02:00
Markus Fisch
c225e7d9eb Advance version number to 1.33.0 2020-07-26 19:25:53 +02:00
Markus Fisch
6a0ce45a65 Optimize copy password button with avocado 2020-07-26 19:15:18 +02:00
Markus Fisch
11c97cc4ef Send scanned code to custom URL in background
As requested in #95.
2020-07-26 19:12:26 +02:00
Markus Fisch
e3f6732bb8 Move onDestroyView() below onCreateView()
Better keep these next to each other.
2020-07-23 11:06:15 +02:00
Markus Fisch
53ae706b9c Add a button to copy WiFi password into clipboard
That can't happen automatically anymore since there's now a setting
to automatically put the barcode contents into the clipboard. If that
is enabled, it'd interfere with this.

Also, it's probably better to make it explict anyway.
Not everybody wants to have passwords in the clipboard.
2020-07-22 14:49:15 +02:00
Markus Fisch
26a7ad2e6e Add a setting for putting contents into clipboard
Automatically, always, in the background.

This setting should come with a warning that, if enabled, all your
scans may leak into other apps through the clipboard.

You know, there are apps that continously probe the cliboard in the
background to send any data they find to their server. Nasty stuff.
2020-07-22 14:29:48 +02:00
Markus Fisch
9c3984ce7a Continue with layout even if it didn't change
Sometimes, on some devices, the soft keyboard takes a bit too long
to vanish and `onLayout()` seems to run while the keyboard's height
is still taken into account. Then, the crop handle may sometime end
up being in the wrong position.

I suppose it's either because `onLayout()` is somehow not invoked
again after the soft keyboard is gone, or because the `changed`
parameter is `false` (despite `bottom` has changed).

This may be because the view itself isn't resized by the soft
keyboard (because of View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) but only
gets bottom padding from `WindowInsets` when the soft keyboard is
visible.

So, because this is quite hard to provoke, I will simply remove
doing nothing when `changed` is `true` and simply (re-)calculate
the position of the crop handle for every `onLayout()`.
2020-07-22 14:00:45 +02:00
zmni
f7d07e0b8a
Update Indonesian translation 2020-07-11 15:24:21 +02:00
Markus Fisch
3fe0f50289 Advance version number to 1.32.1 2020-07-04 15:28:44 +02:00