I develop an sms sender app and I wanna know language that user uses. so, when user types a message how can I know language that he/she uses?
get the input type manager by using:
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
then , choose what to get from it using the next methods :
http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html#getCurrentInputMethodSubtype%28%29
or: http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html#getLastInputMethodSubtype()
together with this to get the locale of the input type:
http://developer.android.com/reference/android/view/inputmethod/InputMethodSubtype.html#getLocale()
1.4m articles
1.4m replys
5 comments
57.0k users