following link mentions that we can find element by giving id... but i am unable to find it.
https://github.com/appium/appium/blob/master/docs/en/writing-running-app
You can use element ID as following:-
package name : com.example.testap
com.example.testap
Element ID : txtLogin
txtLogin
write the following code -
driver.findElement(By.id("com.example.testapp:id/txtLogin")).sendKeys("abc");