From 181991a85c528d4c5cec66303f677285d38d2b97 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 5 May 2014 16:06:02 -0400 Subject: Perhaps our problem is that the Symbol Activity didn't do what we thought it did or had some other side effects. I added a file to experiment with that and added minor changes elsewhere. --- src/us/minak/IMEService.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/us/minak/IMEService.java') diff --git a/src/us/minak/IMEService.java b/src/us/minak/IMEService.java index 6064be9..86c7864 100644 --- a/src/us/minak/IMEService.java +++ b/src/us/minak/IMEService.java @@ -1,5 +1,7 @@ package us.minak; +import java.util.Queue; + import android.inputmethodservice.InputMethodService; import android.view.View; import android.view.inputmethod.EditorInfo; @@ -33,6 +35,12 @@ public class IMEService extends InputMethodService { * Called to inform the input method that text input has started in an editor. */ public void onStartInput(EditorInfo info, boolean restarting) { - // TODO: get characters from this.imeView, and pass them to getCurrentInputConnection().commitText(..., 1); + if (imeView != null) { + final Queue symbolsQueue = imeView.getSymbolsQueue(); + while (!symbolsQueue.isEmpty()) { + final Character character = symbolsQueue.poll(); + getCurrentInputConnection().commitText(String.valueOf(character), 1); + } + } } } -- cgit v1.2.3