• 6

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

The showSoftInputFromInputMethod method from the InputMethodManager class is deprecated in Android P. As per the documentation, we should be using the InputMethodService.requestShowSelf(int) method for Android P and above.

Now the question is how can we get the reference for the class InputMethodService. I tried creating a new object and calling requestShowself() on it but it doesn't work.

InputMethodService inputMethodService = new InputMethodService();

How can we use the suggested alternative for this deprecation for API 28 and above?