Tap on search Bar in android with appium is not working

I am trying to type in a search box within my app and tap/click on search button(magnifying glass) on keyboard. But I am unable to click/tap on it. I have tried below things:

driver.sendKeyEvent(84);
Appium says it successfully sent in the command but ‘search’ does not get tapped. Cursor remains in text box and results do not filter.

HashMap swipeObject = new HashMap();
swipeObject.put(“keycode”, 84);
((JavascriptExecutor ) driver).executeScript(“mobile: keyevent”, swipeObject);
Appium says not yet implemented.

JavascriptExecutor jse = (JavascriptExecutor) driver1; jse.executeScript(“UIATarget.localTarget().frontMostApp().keyboard().buttons()[‘Done’].tap();”);
Appium says not yet implemented.

driver.sendKeyEvent(AndroidKeyCode.ENTER, AndroidKeyMetastate.META_FUNCTION_ON);
Appium says it successfully sent in the command but ‘search’ does not get tapped. Cursor remains in text box and results do not filter.