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()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With