16
InputMethodManager has getEnabledInputMethodList(). You get an InputMethodManager from getSystemService() in your Activity.
As of API 34, InputMethodManager also has a method getCurrentInputMethodInfo() which appears to return the currently selected IME.