inputmethodmanager

showInputMethodPicker from notification not working in Android 9

拟墨画扇 提交于 2021-02-09 12:31:46
问题 My app sometimes shows a notification to simplify switching to the app's internal input method. Therefore, I am executing ((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)).showInputMethodPicker(); when the user clicks the notification. This has worked so far, but does not always work on Android 9: When my app is in foreground, it works. When it is not, nothing happens. On logcat, I see a warning "Warning 889 InputMethodManagerService Ignoring showInputMethodPickerFromClient of uid

showInputMethodPicker from notification not working in Android 9

耗尽温柔 提交于 2021-02-09 12:29:22
问题 My app sometimes shows a notification to simplify switching to the app's internal input method. Therefore, I am executing ((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)).showInputMethodPicker(); when the user clicks the notification. This has worked so far, but does not always work on Android 9: When my app is in foreground, it works. When it is not, nothing happens. On logcat, I see a warning "Warning 889 InputMethodManagerService Ignoring showInputMethodPickerFromClient of uid

showInputMethodPicker from notification not working in Android 9

蹲街弑〆低调 提交于 2021-02-09 12:29:07
问题 My app sometimes shows a notification to simplify switching to the app's internal input method. Therefore, I am executing ((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)).showInputMethodPicker(); when the user clicks the notification. This has worked so far, but does not always work on Android 9: When my app is in foreground, it works. When it is not, nothing happens. On logcat, I see a warning "Warning 889 InputMethodManagerService Ignoring showInputMethodPickerFromClient of uid

InputMethodManager show numpad in webview

依然范特西╮ 提交于 2019-12-24 05:30:22
问题 I'm using the InputMethodManager to programmatically display the softkeyboard when it's needed InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(view, 0); Is there anyway to force the keyboard that appears into being the Number or telephone keypad? Edit Sorry I typed this in a hurry before I had to leave my computer for a while. I forgot to mention possibly the most crucial part. I'm trying to do this in a webview. The input type of

Main Activity is not garbage collected after destruction because it is referenced by InputMethodManager indirectly

独自空忆成欢 提交于 2019-11-27 18:44:55
I followed "Avoiding Memory Leaks" article from here . However the proposed solution does not solve the leak problem. I tested this with android emulator on Windows XP (SDK 2.3.1). I dumped the heap and checked the main activity is still in the heap (I used MAT) Here's what I did: create HelloWorld app with HelloWorldActivity (it has no child views) run Emulator and launch HelloWorld app. close it by clicking back-key. Cause gc in DDMS and dump heap <-- Here I found HelloWorldActivity instance. 'Path to GC Roots' from it shows the following path. HelloWorldActivity <- PhoneWindow$DecorView <-

Main Activity is not garbage collected after destruction because it is referenced by InputMethodManager indirectly

安稳与你 提交于 2019-11-26 19:28:51
问题 I followed "Avoiding Memory Leaks" article from here. However the proposed solution does not solve the leak problem. I tested this with android emulator on Windows XP (SDK 2.3.1). I dumped the heap and checked the main activity is still in the heap (I used MAT) Here's what I did: create HelloWorld app with HelloWorldActivity (it has no child views) run Emulator and launch HelloWorld app. close it by clicking back-key. Cause gc in DDMS and dump heap <-- Here I found HelloWorldActivity instance