Commit graph

110 commits

Author SHA1 Message Date
darcywong00
cfdb2b6591 Hide system OSK when resuming Keyman app
This handles all transitions where an external app/dialog using the system OSK returns to the Keyman app such as resuming:
* from WebBrowserActivity
* from Android Oreo's "Add to dictionary" dialog
2018-04-24 13:41:23 +07:00
darcywong00
ce1781124a Change parameter names for Firebase logging
The `.` character isn't allowed in parameter names passed to Firebase analytics. This was flagging Firebase errors when trying to view the events in the Firebase console.

Replacing `cm.` with `cm_` works. (cm is just the naming convention I used for JS ConsoleMessage properties)
2018-03-16 13:07:14 +07:00
darcywong00
f482aba0f7 Log KMW console error to crashlytics 2018-03-09 08:58:09 +07:00
darcywong00
8e844149e1 Fix path of special OSK font used for longpress of special keys 2018-03-01 14:41:02 +07:00
Darcy Wong
94d2eb52db
Merge pull request #628 from keymanapp/android-increase-connection-timeout-575
Change connection timeout from 10 to 20 sec
2018-02-27 14:28:00 +07:00
darcywong00
ba1d010867 Change connection timeout from 10 to 20 sec 2018-02-26 22:32:07 +07:00
darcywong00
46d9eba5c1 Only passKFont and KOskFont to KMW if they are defined
Per PR review comment, only defined fonts are added to the JSON object going to `kbdInterface.registerStub()`
2018-02-26 14:47:42 +07:00
darcywong00
26f3e52a16 Fix undefined fonts that get passed to KMW
Clean up font parsing so undefined fonts get passed to KMW as `undefined`, and not `'undefined'`.
2018-02-26 12:04:02 +07:00
darcywong00
90246a72e6 [Android] Use BCP-47 codes for registering keyboards 2018-02-21 22:00:21 +07:00
darcywong00
067b43cfd3 Remove Answers
Removing Answers because of the setup involved with Fabric IO. Keeping this feature to Crashlytics
2018-02-14 20:48:26 +07:00
darcywong00
9cd8eed976 Tweak Crashlytics / Firebase
Using Crashlytics for crash reporting.
Trying Firebase and Crashlytics.Answers for logging events (like km_add_keyboard) for analytics

Firebase events don't persist between app launches
2018-02-14 19:37:21 +07:00
darcywong00
84ddf0c990 Add Firebase Crashlytics for crash reporting
While legacy stable kmapro releases have analytics on the Google Play Console, Google recommends [Firebase Crashlytics](https://firebase.google.com/docs/crash/) for crash reporting.
This requires a `google-services.json` file for gradle builds. A sanitized version intended for developers/Debug variant is checked into the repo, and is associated with an appliction ID `com.tavultesoft.kmapro.debug`. The one for `com.tavultesoft.kmapro` releaeses will go on the CI servers.

Breaking change: Consuming apps of KMEA will be responsible for including the Firebase dependencies. At the moment, only kmapro has been updated.
TBD: Registering KMSamples and the Test Harness with Firebase for their own `google.services.json` file.

- Log addKeyboard as an analytic event 
- Update kmapro build.sh script to allow debug-only variant
- Add info to history.md and README.md
- Add Gradle setting so CI server can use production `google-services.json` file
- Temporarily add a menu button to force a crash. This is engineering code that will be removed once analytics in a Release build is confirmed.
2018-02-14 19:37:21 +07:00
Marc Durdin
a6bd7106c3 Use version parameter in all cloud API calls 2018-02-12 19:22:49 +07:00
darcywong00
c85e5991e6 Display welcome.htm for keyboard information
For keyboards installed via keyboard packages, use the welcome.htm if it exists for keyboard information

- Update PackageProcessorTest to include CustomHelpLink info

- Renamed Welcome.htm to welcome.htm in test_resources/**/gff_amh_7_test_json.kmp.
2018-02-12 06:54:08 +07:00
Marc Durdin
d00df683e6
Merge pull request #569 from keymanapp/android-use-api.keyman.com
Use api.keyman.com instead of r.keymanweb.com on Keyman for Android
2018-02-07 12:06:26 +07:00
Marc Durdin
da232c6a9b Fixup to live url 2018-02-06 13:37:28 +07:00
Marc Durdin
ac6408e36e Use api.keyman.com instead of r.keymanweb.com 2018-02-06 13:29:57 +07:00
darcywong00
f85ef3e3e4 Improve UX for KMP distribution
Due to Android's limited set of regex characters for intent actions, any local `.kmp*` file triggers the Keyman app. (e.g. `.kmp` is treated the same as `.kmpo`). Added Toast notifications for when the intent inadvertently triggers the Keyman app.

Also updated PackageActivity to display the package name when no `welcome.htm`  file exists.
2018-02-05 16:36:12 +07:00
darcywong00
b77d8e8a6a Fix ta reference that gets passed to KMW
The text area that gets passed to KMW wasn't being properly initialized. This impacted "cloud" keyboards from working
2018-02-02 11:58:15 +07:00
darcywong00
9211f66c36 Cleanup to address review comments 2018-01-31 10:57:33 +07:00
Joshua A. Horton
aa6e18cf29 Merge branch 'android-download-kmp' of https://github.com/keymanapp/keyman into android-download-kmp 2018-01-30 11:07:18 +07:00
Joshua A. Horton
e389c1e412 Refactored PackageProcessor tests to use two .kmp files. 2018-01-30 11:06:38 +07:00
darcywong00
3be5b63c86 Remove font files from test kmp files
Unit tests don't need font files, so removing them to make slimmer test files
2018-01-30 11:02:58 +07:00
darcywong00
fffe187b23 Use same regex for single-quoting keyboardName and languageName 2018-01-30 10:48:05 +07:00
darcywong00
c306560a18 Add helper functions to get common keyboard paths 2018-01-30 10:17:15 +07:00
darcywong00
a30375c060 Use FileUtils.copy()
Change `copyFile()` to `FileUtils.copy()`
2018-01-30 10:15:31 +07:00
darcywong00
3c74321906 Create test kmp files of different versions
- Modify kmp.json to have package versions 1.4 and 1.5.

- also made exception string more descriptive when JSON object doesn't contain a valid "options" object
2018-01-29 22:25:39 +07:00
darcywong00
09e0f4aa98 Merge branch 'android-peer-distribution'
Conflicts:
	android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java
2018-01-29 18:18:17 +07:00
darcywong00
61bf0410a8 Deprecate non-direct links for ad-hoc keyboards 2018-01-29 16:25:10 +07:00
darcywong00
9bc7b43493 Handle kmp files passed from Android DownloadManager
Intents from the DownloadManager use paths like `/document/number/` so additional code needed to determine the kmp filename.

protocols also separated in switch statement for maintainability.
2018-01-28 23:04:14 +07:00
darcywong00
0afd5796ba Improve UI and check kmp for touch keyboards
- Changed PackageProcessor to skip processing keyboard ID's if JS not found
- Fix a PackageProcessorTest to use the correct package ID
- Added a dialog for when Packge install fails
-
2018-01-27 20:20:00 +07:00
darcywong00
0621354a44 Add clearer toast notification when reverting default keyboard 2018-01-26 16:30:23 +07:00
darcywong00
0e220c6797 Begin addressing review issues
- clean up stray code from earlier development
- give some clear notifications to user when package install fails
2018-01-26 16:07:53 +07:00
darcywong00
35c43da0f3 Associate kmp with keyman app
Add intent-filter and storage permissions so Keyman app will process keyman://, http://, https:// protocols, along with local KMP file. Also add external storage permission
2018-01-24 06:12:03 +07:00
darcywong00
690e69b460 Cleanup Samples and KeyboardHarness
Fix MainActivity to include `onPackageInstalled`.
Also fixed font formatting in KMKeyboard
2018-01-22 20:50:18 +07:00
darcywong00
67929b7c5f Clean up code 2018-01-22 19:10:37 +07:00
darcywong00
bac5acbe3f Use PackageActivity to install keyboard packages
Update MainActivity to pass the downloaded kmp file to PackageActivity.

PackageActivity then unzips and parses the package version, and displays the Welcome page with the package version. If Welcome.htm is not in the package, just display the package ID.

Lastly, copied package processing code from KMKeyboardDownloaderActivity to PackageActivity.

TODO: cleanup KMKeyboardDownloaderActivity
2018-01-22 16:20:35 +07:00
darcywong00
5a795edb3f Download kmp in background
Use IntentService to download KMP in the background
2018-01-21 16:22:27 +07:00
darcywong00
0b5646c722 Handle font paths and change PackageActivity button style 2018-01-20 22:12:59 +07:00
Joshua A. Horton
a3396c00c4 Namespaces the app's keyboards, fixes related bugs. 2018-01-19 16:14:50 +07:00
Joshua A. Horton
2b3cb459e5 Removed errors from PackageProcessor integration. gff_amh_7 keyboard still has problems, though. 2018-01-19 11:47:36 +07:00
Joshua A. Horton
8c223a10ed Basic KMP integration success - it still has some glitches, though. 2018-01-18 17:00:59 +07:00
darcywong00
ed9c6e09a6 Load keyboards that don't contain version string in the filename
Keyboard paths that get passed to KMW will depend on the `packageID`

1. Keyboards distributed ad-hoc via kmp (stored in `/packages/packageID/` won't have version strings in their filename.
2. Legacy keyboards in the `/cloud/` directory will still contain version strings
2018-01-18 13:23:58 +07:00
Joshua A. Horton
fb121e1016 Adds direct installation tests, fixes a bug, adds the ability to force a downgrade, and allows lookup of contained keyboard versions. 2018-01-18 11:20:39 +07:00
darcywong00
3a0134a758 Handle undefined packageID as "cloud"
Per design discussions, use "cloud" as the package ID when it's undefined. Those keyboards get stored physically at `/cloud/`.

Later on, keyboards installed via kmp will be installed at `/packages/packageID/`

Also update version checker depending on package ID:
1. cloud:  use the version string within the filename
2. all others: parse kmp.json for the keyboard version
2018-01-17 16:08:46 +07:00
darcywong00
4787245808 Round 1 of adding feature for ad-hoc keyboard distribution via kmp 2018-01-17 10:58:25 +07:00
darcywong00
867c8cc3ab Ensure downloaded keyboard is added before attempting to set it 2017-12-15 11:39:26 +07:00
darcywong00
82f78f005c Document why removeKeyboardDownloadEventListeners are removed
Calls to `removeKEyboardDownloadEventListener()` are removed to ensure `onKeyboardDownloadFinished()` gets called
2017-12-15 10:24:40 +07:00
darcywong00
9cf5e5114c Enable regex for font and oskFont filepaths. 2017-12-14 15:26:47 +07:00
darcywong00
27629a578b Tweaks for keyboard update
Include language name and keyboard name when updating keyboard version. Dismiss the updateProgress dialog when keyboard has finished downloading.

Also fixed a typo in comment
2017-12-14 13:38:15 +07:00