My modification base on the android automation tool Robotium.