Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] exceptions switching to certain keyboards #992

Closed
darcywong00 opened this issue Jun 16, 2018 · 7 comments
Closed

[android] exceptions switching to certain keyboards #992

darcywong00 opened this issue Jun 16, 2018 · 7 comments
Assignees
Milestone

Comments

@darcywong00
Copy link
Contributor

I'm getting intermittent weirdness switching to certain keyboards.
Screenshot below is from [sil_bwe_karen]. In the keyboard catalog, it's listed under "Karen, Bwe".

Is there some KMW issue with BCP 47 tags involving script tags?

Using Keyman Android 10.0.401 beta
Android 7.1 Nougat

screenshot_20180616-141116

Once this happens, it seems to trigger switching to every currently installed keyboard . even the default EuroLatin2. The keyboards seem to still type in the app.

@darcywong00
Copy link
Contributor Author

When the Android app attempts to download sil_bwe_karen

https://api.keyman.com/cloud/3.0/languages/bwe/sil_bwe_karen?version=10.0.0.0&device=androidphone

returns an empty language object

{
	"options": {
		"context": "language",
		"dateFormat": "standard",
		"device": "androidphone",
		"keyboardBaseUri": "https://s.keyman.com/keyboard/",
		"fontBaseUri": "https://s.keyman.com/font/deploy/",
		"keyboardid": "sil_bwe_karen",
		"languageid": "bwe",
		"keyboardVersion": "current"
	},
	"language": []
}

@mcdurdin
Copy link
Member

The Android app should be looking up https://api.keyman.com/cloud/3.0/languages/bwe-Latn/sil_bwe_karen?version=10.0.0.0&device=androidphone&languageidtype=bcp47

Which returns

{
	"options": {
		"context": "language",
		"dateFormat": "standard",
		"device": "androidphone",
		"keyboardBaseUri": "https:\/\/s.keyman.com\/keyboard\/",
		"fontBaseUri": "https:\/\/s.keyman.com\/font\/deploy\/",
		"languageid": "bwe-Latn",
		"keyboardVersion": "current"
	},
	"language": {
		"name": "Karen, Bwe",
		"id": "bwe-Latn",
		"keyboards": [{
			"id": "sil_bwe_karen",
			"name": "Bwe Karen (SIL)",
			"filename": "sil_bwe_karen\/1.0\/sil_bwe_karen-1.0.js",
			"lastModified": "2018-06-15",
			"version": "1.0",
			"fileSize": 13552
		}]
	}
}

@darcywong00
Copy link
Contributor Author

hmm, that's something for us to chase down.

In the debugger, I'm seeing language ID bwe instead of bwe-Latn in the Keyboard downloader activity...

@mcdurdin
Copy link
Member

I've put this into the plan for this sprint because I think this needs to be fixed before 10.0 stable release.

@darcywong00
Copy link
Contributor Author

#1012 added the filter to the language tag query.

But I'm still seeing symptoms on my physical device (Android 7.1).
Fresh install, hit the globe button

en_european2

console log shows kmw_console_error

kmw_console_error, Bundle[{keyboardVersion=1.6, cm_lineNumber=328, keyboardID=european2, firebase_event_origin(_o)=app, firebase_error_length(_el)=140, firebase_error_value(_ev)=cm_message, firebase_error(_err)=4, cm_sourceID=file:///data/user/0/com.tavultesoft.kmapro.debug/app_data/keyman.js, keyboardName=EuroLatin2 Keyboard, keyboardType=INAPP, packageID=cloud}]
06-19 16:18:10.687 29804-29856/com.tavultesoft.kmapro.debug V/FA: Connection attempt already in pro

I can then add sil_bwe_karen and arabic_izza keyboards. But switching to keyboards gives similar console errors.

@darcywong00
Copy link
Contributor Author

console error for sil_bwe_karen

kmw_console_error, Bundle[{keyboardVersion=1.0, cm_lineNumber=328, keyboardID=sil_bwe_karen, firebase_event_origin(_o)=app, firebase_error_length(_el)=140, firebase_error_value(_ev)=cm_message, firebase_error(_err)=4, cm_sourceID=file:///data/user/0/com.tavultesoft.kmapro.debug/app_data/keyman.js, keyboardName=Bwe Karen (SIL), keyboardType=INAPP, packageID=cloud}]
06-19 16:20:32.823 29804-30173/com.tavultesoft.kmapro.debug D/FA: Logging event (FE):

I wonder if the KMW namespacing bwe-Latn_sil_bwe_karen is having issues with the hyphen separator...

@darcywong00
Copy link
Contributor Author

darcywong00 commented Jun 19, 2018

From the debugger, the console error message from KMW is
Ignored attempt to cancel a touchcancel event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
line 328 of keyman.js

As an experiment, in kmwosk.ts I commented out line 4341

util.attachDOMEvent(osk._Box,'touchcancel',function(e){e.preventDefault();e.stopPropagation();});

That seemed to get rid of the KMW console error. Dunno the side-effects...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants