Send_keys creates a circular loop in google maps app on Android

I am using appium to launch Google Maps on Android Pie. Here are my capabilites

{
  "appPackage": "com.google.android.apps.maps",
  "appActivity": "com.google.android.maps.MapsActivity",
  "platformName": "Android",
  "deviceName": "Android Emulator"
}

After launch I am sending keys using following code …

elements = self.get_webelements("//android.widget.EditText")
elements[anchor_index-1].send_keys(text)
where anchor_index is 2 since there are 2 android.widget.EditText

But I face following problem –

a) When it enters text then it gets into loop of clearText + send_keys + clearText + send_keys

Note: I am able to send keys using Appium Inspector where capability sets browserName to “firefox”, but that seems to work properly, i.e. sends keys and stops as expected.

Any idea what needs to be done here?

Regards

Ok my bad. It was due to the way my loop was written. so nothing wrong with appium. we can close/delete this