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

561 Commits

Author SHA1 Message Date
Markus Fisch
1c1625b6fd Simplify toasting with an extension function
All these Toast.makeText().show() blocks mean too many
unnecessary repetitions.
2020-04-02 21:34:39 +02:00
Markus Fisch
9c4cb0daad Suggest a WiFi network on Android Q
Because WifiConfiguration and WifiManager.addNetwork() (and all
related functions) were deprecated in Android Q.

Because we target Android Q, WifiManager.addNetwork() will always
fail and return -1.

On Android Q, we can only suggest the system (and user) a WiFi
network but cannot add it permanently ourselves.
2020-04-02 21:28:55 +02:00
Markus Fisch
024dd379e8 Run RenderScript.forceCompat() for LineageOS only
Since forceCompat() disables the native implementation, what is
a drawback for all other devices whose native implementation is
fully functional.
2020-04-02 21:23:55 +02:00
Markus Fisch
16c4957c79 Simplify saving a generated barcode image 2020-04-01 22:38:09 +02:00
Markus Fisch
01741b83cd Fix vibrating for Android O and higher
The amplitude was too small.
2020-04-01 22:30:55 +02:00
Markus Fisch
4200b3274a Fix typo in german translation 2020-04-01 22:27:16 +02:00
Markus Fisch
eabd14eb60 Use ContentResolver to save external files on Q+
To support Android Q and future Android versions.
2020-04-01 22:21:37 +02:00
Markus Fisch
778c087930 Clean up unnecessary/unused code
According to Android Studio's recommendations.
2020-04-01 15:16:09 +02:00
Markus Fisch
cd646a2e90 Add annotations for deprecated code
Because this code is not going to change anytime soon.
So it's better to just annotate them to keep those warnings
out of the way.
2020-04-01 15:13:48 +02:00
Markus Fisch
be6576ac74 Add annotations to mark experimental/preview stuff 2020-04-01 15:13:20 +02:00
Markus Fisch
6460500a4d Use new ClipboardManager for HoneyComb and better 2020-04-01 14:52:24 +02:00
Markus Fisch
02474dfad2 Move getting fragment for intent into own function
Improves readability and needs less code.
2020-04-01 13:57:52 +02:00
Markus Fisch
d78fd109ff Use VibrationEffect in Android O or better
Instead of the deprecated `Vibrator.vibrate(int)`.
2020-04-01 13:54:23 +02:00
Markus Fisch
85e3f49270 Fix path to latest Inkscape on macOS 2020-04-01 10:23:52 +02:00
Markus Fisch
59d40b944b Show latest possible result point in camera view 2020-03-30 19:57:57 +02:00
Markus Fisch
1e82e8bd53 Use a sorted map to enlist metadata items
A HashMap is unsorted of course what means the order of the
metadata items was random.
2020-03-27 18:12:20 +01:00
Markus Fisch
ab5e9b6e9b Advance version number to 1.24.0 2020-03-24 21:29:48 +01:00
Markus Fisch
7336d8d12b Try to resolve URL intent before starting it
Because, apparently, there are devices where this intent cannot
be resolved.

Also put the project URL into a resource so we can at least show
it in a Toast if there's no browser installed. Might as well put
it in the clipboard some day.
2020-03-24 21:09:42 +01:00
Markus Fisch
1c9dd73d9a Check resultPoints for null before using it
ZXing's Result.getResultPoints() may as well return null.
2020-03-24 20:55:07 +01:00
Markus Fisch
5892002a89 Use legacy storage permission model for Android Q
Just simply use `requestLegacyExternalStorage="true"` to opt out
of the new Scoped storage model for the time being.

As soon as we set Android 11 as target version, this will no longer
work!

Details on the issue:
https://developer.android.com/preview/privacy/storage
2020-03-24 20:34:06 +01:00
Markus Fisch
540290e97c Include meta data in CSV export 2020-03-24 20:26:00 +01:00
Markus Fisch
f315916fb8 Add a dot before csv suffix
The suffix is not an extension but just a string that
gets appended to the file name.
2020-03-24 20:25:02 +01:00
Markus Fisch
e75bb48360 Add a preference switch to show/hide metadata
If there's one for the hex dump, there should be a switch
for the metadata as well.
2020-03-24 18:28:36 +01:00
Markus Fisch
2b1d711168 Show ZXing metadata after decoding
Also save the metadata in the history so it's still available
for past scans.
2020-03-24 18:21:30 +01:00
unbranched
2af5a89430
Update italian translation 2020-03-21 14:32:13 +01:00
Markus Fisch
b640fa1372 Reset flash flag when camera is closed
Closing the camera will also shut off the flash.

This fixes the bug that when you scan a barcode with the flash on and
immediately go back (to the previous instance of CameraActivity), the
flash flag will still be true when the flash is off.

Fix for https://github.com/markusfisch/BinaryEye/issues/101
2020-03-19 18:08:54 +01:00
Markus Fisch
8e24673d08 Advance version number to 1.23.0 2020-03-14 20:14:12 +01:00
Markus Fisch
ae54e62ec3 Update comments about building on macOS Catalina 2020-03-14 20:05:14 +01:00
Markus Fisch
420a4cbad3 Limit history items to one line
And ellipsize content if longer.
2020-03-14 19:47:45 +01:00
Markus Fisch
05ec77da27 Add a setting to show/hide hex dump 2020-03-14 19:39:17 +01:00
Markus Fisch
c03abf1148 Add a setting to not save consecutive double scans 2020-03-14 16:11:35 +01:00
Markus Fisch
b929df4848 Always set window inset listener
In case there is a configuration (orientation) change later on.

And always return previously initialized window insets what is
required when Fragments change and the listener won't fire (again).

Also use an explicit variable to know when the window insets rect
has been initialized. `Rect.isEmpty()` doesn't cut the mustard.
2020-03-14 15:56:53 +01:00
Markus Fisch
ec729b6624 Move infos about supported barcodes down
Probably the least interesting part.
2020-03-14 14:31:52 +01:00
Markus Fisch
67471ee141 Advance version number to 1.22.3 2020-03-12 10:07:30 +01:00
Markus Fisch
6999f0a863 Advance version number to 1.22.2 2020-03-11 21:52:33 +01:00
Markus Fisch
6574a5d651 Fix getting window insets for Lollipop and above
Don't use the static `windowInsets` when `setWindowInsetListener()`
is called because this is just for pre-Lollipop devices where
`ViewCompat.setOnApplyWindowInsetsListener(view)` *never* fires.
2020-03-11 21:42:55 +01:00
Markus Fisch
1639e73738 Advance version number to 1.22.1 2020-03-10 19:32:06 +01:00
Markus Fisch
68fa67f54f Save non-printable content as raw data 2020-03-09 17:05:42 +01:00
Markus Fisch
326c34b6c1 Clean up some style issues 2020-03-09 17:04:31 +01:00
Markus Fisch
a43dca3644 Advance version number to 1.22.0 2020-03-04 21:51:06 +01:00
Markus Fisch
168ccf7d10 Remove using a special tool version for Catalina
But keep using a special version for `buildToolsVersion` since
RenderScript requires a minimum of 29.0.3 on Catalina what
doesn't work on Linux yet.
2020-03-02 13:59:23 +01:00
Markus Fisch
a9630b4d53 Optimize imports 2020-02-28 21:58:59 +01:00
Markus Fisch
4a138bd425 Highlight detected barcodes in camera view too
Although it's just visible before the result screen
takes over.
2020-02-28 21:48:54 +01:00
Markus Fisch
339ff59270 Update build tools 2020-02-27 22:22:21 +01:00
yzqzss
d208ec12bc
Add bing and yandex search engines 2020-02-23 14:06:54 +01:00
yzqzss
893ddefa71
Update Chinese Translation 2020-02-22 19:35:36 +01:00
Markus Fisch
5d56365e79 Skip forceCompat() when building on Catalina
Calling RenderScript.forceCompat() on a build that was made with the
new build tools (which are required to make RenderScript build again
on macOS Catalina), results in a RSRuntimeException (Loading of ScriptC
script failed).

RenderScript.forceCompat() was introduced to fix RenderScript for
Lineage 16.0. Maybe this is no longer required with those new build
tools?

Yes, this means this setup is producing platform independent builds
that have different features depending on what platform they were
built on. And yes, that's as bad as it sounds.

So, for the time being, it's probably better to _NOT_ use Catalina
to make release builds.
2020-02-20 15:08:52 +01:00
Markus Fisch
3237467503 Check for macOS Catalina and use appropriate tools
Since RenderScript can no longer be compiled on macOS Catalina
because Catalina cannot run 32bit binaries and Google failed
to provide a 64bit compiler in time. Now, as if that wasn't
bad enough, the new build tools that provide a 64bit compiler
don't work on any other system than macOS unfortunately.

For details on the issue see:
https://issuetracker.google.com/issues/142590626
2020-02-20 15:08:06 +01:00
Markus Fisch
346529469c Revert "Update build tools for macOS Catalina"
This reverts commit cf4020c613.

Those new build tools don't work on other systems than macOS
Catalina and even there produce broken builds :(

Also, it looks like the only solution is to remove
`RenderScript.forceCompat()` what's probably no longer
required to support Lineage 16.0 with those new build tools.
Confirmation pending.
2020-02-18 16:23:39 +01:00
zmni
9f4e420dbb
Update Indonesian translation 2020-02-17 15:09:33 +01:00