Commit graph

1710 commits

Author SHA1 Message Date
Darcy Wong
5baf4eac89 fix(android/engine): Check listview for setting keyboard selection 2022-09-19 14:26:19 +07:00
Darcy Wong
11afaf03f8 test(android): Add final keyboard to test K_ENTER 2022-09-16 11:39:42 +07:00
Darcy Wong
747d377671 fix(android/engine): Switch keyboard if uninstalling current one 2022-09-14 09:52:27 +07:00
Darcy Wong
8ca5ced03d
Merge pull request #7239 from keymanapp/fix/android/language-picker-association
fix(android): Standardize language ID in language picker menu
2022-09-10 07:04:27 +07:00
Darcy Wong
77997f4477 fix(android/engine): Cleanup toggleLanguage() 2022-09-09 08:48:55 +07:00
Darcy Wong
d27d77955b
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-09-09 07:47:58 +07:00
Darcy Wong
04906cfe0d fix(android/engine): Do similar toggle for keyboard list 2022-09-08 13:28:16 +07:00
Darcy Wong
1fb1c243ef fix(android/engine): Use BCP47.toggleLanguage 2022-09-08 13:28:16 +07:00
Darcy Wong
f90ed759cf chore(android/engine): Revert packageprocessor change 2022-09-08 13:28:16 +07:00
Darcy Wong
239da832d5 fix(android/engine): Fix language tag in language-picker menu 2022-09-08 13:28:16 +07:00
Marc Durdin
4a3aca8a05 chore(android): disable keyman-staging tests 2022-09-08 14:47:44 +10:00
Marc Durdin
f836574cbc chore: use keyman.com instead of keyman-staging.com
Fixes #7227.

We want to use keyman.com for now even for alpha builds, as
keyman-staging.com is going to be used for transition to Docker-based
hosting, and it will be problematic to try and share that process with
alpha builds.
2022-09-08 14:32:39 +10:00
Darcy Wong
bad8806c27
Merge pull request #7156 from keymanapp/fix/android/longpress-backspace
fix(android/engine): Fix Backspace key to delete without errant subkeys
2022-09-07 06:26:14 +07:00
Darcy Wong
b81f3795d0 chore(android/engine): Apply suggestion for refactor 2022-09-02 11:00:03 +07:00
Darcy Wong
d57d77670c
Update android/KMEA/app/src/main/java/com/tavultesoft/kmea/data/CloudRepository.java
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-09-02 09:30:01 +07:00
Darcy Wong
ece4856253 chore(android/engine): Remove Toast when resources up to date 2022-08-31 14:26:54 +07:00
Darcy Wong
ede572a464 chore(android): Reduce Toast notification noise 2022-08-31 11:30:16 +07:00
Darcy Wong
9198ffbff0
Update android/KMEA/app/src/main/java/com/tavultesoft/kmea/KMKeyboard.java
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-08-31 07:39:11 +07:00
Darcy Wong
d7430c3efc fix(android/engine): Cleanup list of subkeys when dismissing window 2022-08-30 14:27:07 +07:00
Darcy Wong
987e2d37d2 fix(android/engine): Lower the max height for landscape orientation 2022-08-24 15:44:28 +07:00
Marc Durdin
6644697eec
Merge pull request #7001 from keymanapp/fix/android/6899-verify-browser-for-links
fix(android): verify browser before starting activity
2022-08-23 17:07:51 -05:00
Marc Durdin
f90eaee6dd fix(android): add toast when browser fails to open 2022-08-23 07:41:56 +10:00
Marc Durdin
c1118d908c
Merge branch 'master' into chore/common/builder-script-target-and-option-support 2022-07-29 10:37:18 +10:00
Marc Durdin
bdb7b5e45a fix(android): verify browser before starting activity
Fixes #6899.
2022-07-27 15:16:02 +10:00
Marc Durdin
767927bf16 chore(common): use /usr/bin/env bash
Fixes up scripts (except under /linux) to use `#!/usr/bin/env bash`
instead of `#!/bin/bash` or `#!/bin/sh` so that we don't end up with
the ancient version of bash supplied with macOS.

This became urgent with this PR, because of bash-4.xisms in
build-utils.sh, for example on line 572:

```
if [[ -v _builder_params[$e] ]]; then
```
2022-07-25 14:59:37 +10:00
Marc Durdin
ae45b69b5f fix(android): rework longpress movement trigger
Fixes #6981.

Longpress menus were being triggered on any detected movement on keys on
Android. This would cause rapid typing to periodically fail as the user
would make a single-pixel movement while typing, which would then block
subsequent key events.

This issue was introduced in #6637, which resolved a somewhat related
problem with sticky longpress menus.

The fix is in three parts:

1. Remove the touch movement detection which caused the primary problem
2. Address some logic issues around visibility of `subkeysWindow`
3. Introduce a new 'scroll' gesture handler which detects a negative-y
   movement above a 5px threshold, to open the longpress menu.

The 5px threshold is the minimum default used by Keyman Engine for Web.
However, it may not be ideal, and we should consider moving to using the
0.25 x row height value that Keyman Engine for Web uses in a future
update. However, I do not consider this to be a reason to block this
fix, as it would require significant extra engineering.
2022-07-25 08:03:02 +10:00
Marc Durdin
1f5785f61d chore(android): tweak sendError for js errors 2022-07-07 09:52:26 +10:00
Marc Durdin
2bc73c1af0 chore(android): disable sendError for js errors 2022-07-07 09:52:25 +10:00
Marc Durdin
0b64871be3 fix(web): improve console.error() reporting
The back story:

Currently Keyman for Android reports errors sent to the console via
`console.error()` into Sentry but sentry-manager itself does not. This
means that Keyman for iPhone and iPad and other users of sentry-manager
do not report these errors. Many of these errors are important.

What's worse is that Keyman for Android's error reporting here (via the
`sendKMWError()` function in Keyman Engine for Android) does not capture
stack traces, and so many of the errors we get do not have enough
information to resolve them.

Furthermore, by having `sendKMWError()` in Keyman for Android, we
capture exceptions and other program errors twice -- once on the web
side, and once on the Java side -- this adds noise to our error
reporting. Sentry also tends to lump many unrelated `sendKMWError()`
events together, so tracking resolution to the errors is painful.

The fix:

This adds a patch to sentry-manager to capture `console.error()` and
`console.warning()` events and report them through Sentry's normal error
reporting, and disables the `sendKMWError()` report (although we leave
the breadcrumb in place for when there are later, related Java errors).
There is a Sentry integration called CaptureConsole, but it does not
support capturing stack traces until v6.14
(https://github.com/getsentry/sentry-javascript/pull/4034). Updating
Sentry to 6.14 or newer is a bigger job (due to ES6 baseline req. etc.)

Note that Keyman for iOS currently has some other stubs in place
overriding the `console.*` functions. These should be removed for
release builds, so that we can use this pattern instead. I will try and
tackle this in a follow-up PR (I will build it on my mac so I can test
it).

A sample error report captured with this mechanism (no sourcemaps here
because this is a -local build):

https://sentry.io/organizations/keyman/issues/3401287467/events/c40fd2cebb7743cc8dfe72e0dd34bf65/?project=5983524

I am proposing we back-port this to 15.0-stable as we are missing a lot
of data in many of our error reports on Android.
2022-07-05 10:57:42 +10:00
Joshua Horton
f6841333a2
Merge pull request #6557 from keymanapp/change/web/5943-ie-rooting
change(web): drops old IE-related handling code
2022-06-24 08:35:03 +07:00
Marc Durdin
0212727b98 chore: Merge branch 'master' into chore/beta-to-master-A16S4 2022-06-15 12:54:35 +10:00
Marc Durdin
1199c5602a
Merge pull request #6704 from keymanapp/fix/android/getKeyboardInfo-with-invalid-index
fix(android): check index validity in getCurrentKeyboardInfo
2022-06-15 06:17:52 +10:00
jahorton
3738519412 chore(android): adds diagnostic logging to assist a fix for #6703 2022-06-13 10:50:32 +07:00
Marc Durdin
4a9b529562
Merge pull request #6671 from keymanapp/fix/android/hardware-key-no-vibrate
fix(android/engine): Disable haptic feedback on hardware keystrokes
2022-06-10 07:24:51 +10:00
Marc Durdin
958fbd3e40 fix(android): check index validity in getCurrentKeyboardInfo
This fixes crash reported as #6703. This issue was first reported in
14.0.282-stable. I have done a careful review of changes in 14.0.282
(and 14.0.281) but have been unable to find any changes that could have
bearing on this.

The basic issue is that there appears to be some circumstances where
`KMManager` thinks that it has a keyboard loaded (ref
`SystemKeyboardLoaded` variable), but `KMKeyboard.currentKeyboard` is
still `null`.

The crash has been reported for only a very small set of users, 119 at
time of fix, but average reports per user is over 100. As is usual with
this type of thing, a small fraction of those users are reporting the
majority of crashes. I have not found any real commonality across the
error reports -- they are geographically dispersed, across multiple
device types and Android versions.

Note that this addresses the error at hand but as I am unable to
reproduce the issue, does not necessarily address the root problem, so
there may still be other issues reported even after this is fixed.

A longer-term refactor would eliminate `SystemKeyboardLoaded` because
from what I can tell, we should always be able to determine that from
the state of `KMKeyboard.currentKeyboard`. However, the state
entanglement is a lot deeper than just those two variables, with cross
references to keyboard indexes between `KMManager` and `KMKeyboard`
which need to be resolved (`KMKeyboard` should *never* refer to
`KMManager`).
2022-06-05 06:46:39 +10:00
Marc Durdin
b69872d589 fix(android): move hardware keystroke flag to JS module 2022-06-04 08:44:24 +10:00
jahorton
93e36539de chore(android): build now includes es6-shim polyfill 2022-05-31 09:30:52 +07:00
Marc Durdin
fcf78bcd94 chore: merge master into branch 2022-05-27 13:11:23 +10:00
Darcy Wong
7988b59eff fix(android/engine): Disable haptic feedback on hardware keystrokes 2022-05-27 08:14:09 +07:00
Darcy Wong
d247e475df chore(common): Update crowdin strings for Spanish (Latin America) 2022-05-24 08:37:34 +07:00
Darcy Wong
7e72074d57 fix(android/engine): Cleanup when subkeys displayed 2022-05-20 12:27:59 +07:00
Darcy Wong
0a39e4e4b1 chore(android/engine): Use switch statement for gesture 2022-05-20 11:32:57 +07:00
Darcy Wong
9916da44aa fix(android/engine): Investigate sticky long-press keys 2022-05-20 11:32:57 +07:00
Darcy Wong
4cdb5072f7
Update android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/KeymanSettingsActivity.java
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-05-20 09:17:10 +07:00
Darcy Wong
4afd872f29 chore(android): Rename variables per review 2022-05-19 09:50:13 +07:00
Marc Durdin
05a4c33200 chore(web): move common/core/web to common/web
Relates to #5816.

Moves folders under common/core/web to common/web:

* input-processor -> common/web/input-processor
* keyboard-processor -> common/web/keyboard-processor
* tools/recorder -> common/web/recorder
* tools/sentry-manager -> common/web/sentry-manager
* utils -> common/web/utils

Updates scripts and configuration to point to new folders.
2022-05-18 06:01:03 +10:00
Darcy Wong
25acb85f04 chore(android): Update screenshot of Settings menu 2022-05-17 14:08:47 +07:00
Darcy Wong
3eb5508eac chore(android/app): Update help 2022-05-17 13:47:57 +07:00
Darcy Wong
ced46c8a2e feat(android): Add UX to control haptic feedback 2022-05-17 13:44:34 +07:00
Darcy Wong
ab8ff86c4b feat(android/engine): Add haptic feedback when typing 2022-05-17 13:07:22 +07:00