Why can I not use Swype for keyboard input in my app?
in
Android Processing
•
29 days ago
Hello!
I am working on an application that is supposed to take text input in a very convenient way. I am using the regular Android virtual keyboard, on a Nexus 7 that has Swype installed.
The problem is, when I run my application on the device, Swype does not function. I can use regular tap input, but I need to enable Swype in some way.
Otherwise, Swype works in all other applications.
Below are 2 snippets from the code where the keyboard is involved, pretty basic.
I am using Processing 2.0b9, on a OSX 10.7.
Thanks.
I am working on an application that is supposed to take text input in a very convenient way. I am using the regular Android virtual keyboard, on a Nexus 7 that has Swype installed.
The problem is, when I run my application on the device, Swype does not function. I can use regular tap input, but I need to enable Swype in some way.
Otherwise, Swype works in all other applications.
Below are 2 snippets from the code where the keyboard is involved, pretty basic.
- import android.view.inputmethod.InputMethodManager;
import android.content.Context;
import android.inputmethodservice.KeyboardView.OnKeyboardActionListener;
import android.view.KeyEvent;
import android.view.View; - void showVirtualKeyboard() {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}
void hideVirtualKeyboard() {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);
}
I am using Processing 2.0b9, on a OSX 10.7.
Thanks.
1