← Back to team overview

meadl-devel team mailing list archive

Re: Integration of Tekla & Dasher

 

Hola Alan,

I think I had a bit of a simplistic idea of how this would work, your suggestions are definitely more comprehensive. I simply imagined adding to Tekla an IME preference for text entry that would only be shown if Dasher (or any other compatible IMEs) were detected on the system. It would just be a drop-down or radio button list including only Tekla and Dasher initially.

What you suggest is a bit more granular than that, so we could break up the text-entry preference I had imagined into the various types of entry available and let users select an alternative for each (with the default being our respective IMEs). So this is a lot like your second suggestion and the only real challenge, as you mentioned, would be to sync the preferences between the two or more compatible IMEs so users don't have to set their preferences on all of them.

Your first idea seems reasonable too, but I don't think the system works that way. Once a new IME is called, it effectively becomes the primary IME (regardless of the time it stays in that role), so the idea of "secondary IME" would be a bit awkward, me thinks...

On a related note, as you know, the Tekla Switch Event Provider (SEP) is currently sending broadcasts, but I think client applications should instead bind to it because it really doesn't make sense to let more than one app process switch events at the same time. Instead, client applications should request a lease to SEP events and release the lease when the user is done with the app so others can take it. That would also help with the transition between Dasher and Tekla while using a Shield. I keep thinking some apps like switch-accessible games would want to keep an exclusive channel for receiving switch events without having to show any IME to the user. What do you think? Do you know how apps can bind to services? Maybe we should get working on this sooner rather than later.

  So in conclusion:

1. I think your second suggestion makes the most sense so we need to come up with a way to create a common preference framework, and 2. I would like you to help me move from a broadcasting to a leasing/binding SEP if you think the change makes sense.

cheers!
Jorge

On 11-02-17 07:14 AM, Alan Lawrence wrote:
- the main thought I'm having is that
one feature we want to add to Dasher, is the ability to revert back to
a non-Dasher (i.e. standard keyboard) IME for entering data into
certain kinds of fields: e.g. passwords, possibly even web addresses
(where the standard language model we have isn't all that great!). So
really we'd like to come up with a framework that lets us do both of
these things together - i.e. it seems more than reasonable to make the
fallback keyboard interface be Tekla....

Thus, I'm seeing a few options:

*One way is to have a "main" IME, that stays in charge, with the
ability to fall-back to an alternative IME under certain conditions.
So we specify some kind of Intent, posted by the main IME to the
secondary one, that "the next time you get activated, it should be
only temporary". Then, when the user enters a text field, or whatever,
such that the secondary IME is wanted, the main IME notifies the
second one with this Intent, and then makes the second one the active
input method via InputMethodManager (as we have to, I think).

The secondary IME, upon receiving such an intent, records that the
next time it becomes active, this should only be temporary; and
immediately input finishes, it reactivates (via InputMethodManager)
the primary one again.

The problem I can see here, tho, is detecting when input has finished:
the onFinishInput method that's supposed to be called by Android is,
in my experience, often called a lot later than it seems it should be.
(Switching to another field tends to call onStartInput rather more
promptly, IIRC, but this doesn't help in all cases!)...

*A second way is a more co-operative approach. We have Preferences in
Dasher, "use Tekla for XYZ", and Preferences in Tekla, "use Dasher for
UVW"; whenever either IME is activated under those conditions, it
transfers control to the other using InputMethodManager, and*hopes*
that the other will transfer control back appropriately (i.e. that the
inverse preferences are set there).

An enhancement might be to transmit intents between the two when
either's preferences are changed, to keep the other's preferences in
sync.

*A third way, and I'm not sure how practical/different this would be,
is to make both Tekla and Dasher_not_  be input methods, but somehow
be activated/called by a single "Overseer" IME. (Or indeed, to make
either libraries, in some way that lets them be called by the other,
or something like that). This might solve a lot of problems, but OTOH
I'm not sure whether the necessary architecture for this exists in
android, would have to look into it...

Hmmm. Ok, your turn;-). I'm wondering if you've been thinking about
this more than me, I've been concentrating on a couple other things of
late...

Cheers, Alan