I have to automate an Android application, I am doing the same through Appium.
The problem I am facing is after launching the Appium server, the app is getting instal
Make sure everything on your screen is static. And flashing input cursor is also not allowed. Any painting actions will stop uiautomator from dumping current UI.
You can test by using following adb command:
adb shell uiautomator dump /data/local/tmp/uidump.xml
if the message ERROR: could not get idle state.
appears, you are suffering from this issue.
See lines 87 & 101 of DumpCommand:
try { ... uiAutomation.waitForIdle(1000, 1000 * 10); ... } catch (TimeoutException re) { System.err.println("ERROR: could not get idle state."); return; }