Android. Can't get appium to work

I used to work with Selenium Webdriver and currently use Calabash. Now researching appium.
And I am stuck at the very first simple step. Just inputting pin code.
I can get appium to start the app from USB connected phone and that’s it so far. I don’t know what I am missing.

I have 2 steps in feature file:

Feature: App setup
I want to launchmy app

Scenario: Settings
Given I wait for 8 seconds
Given I enter pin code

And my steps.rb file looks like this:

Given /^I wait for (\d+) seconds$/ do |seconds|
wait(seconds.to_i)
end

Given /^I enter pin code$/ do
find_element(“android.widget.EditText id:‘xetpin’”).type(“1234”)
end

The output I get is:

Scenario: Settings # features\settings.feature:4
com.xyz.abc.android/.app.personal.activities.user_select.UserSelectActivity never started. Current: com.xyz.abc.android/
.app.personal.activities.add_account.ChoosePin (Selenium::WebDriver::Error::WebDriverError)
C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/response.rb:52:in assert_ok' C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/response.rb:15:ininitialize’
C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:59:in new' C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:59:increate_response’
C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:66:in request' C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:40:incall’
C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:640:in raw_execute' C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:101:increate_session’
C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:68:in initialize' C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/driver.rb:33:innew’
C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/driver.rb:33:in for' C:/Ruby/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver.rb:67:infor’
C:/Ruby/lib/ruby/gems/2.0.0/gems/appium_lib-4.1.0/lib/appium_lib/driver.rb:464:in start_driver' C:/features/support/env.rb:25:inBefore’
Given I wait for 8 seconds # features/step_definitions/steps.rb:6
Given I enter pin code # features/step_definitions/steps.rb:11

Failing Scenarios:
cucumber features\settings.feature:4 # Scenario: Settings

1 scenario (1 failed)
2 steps (2 skipped)

This error message means your app wait activity desired capability isn’t matching the actual activity that shows up in the app. You could try omitting the appActivity and appWaitActivity to see if appium’s default algorithm identifies the correct values. If not then you’ll need to update to the correct activity.

I recommend trying out some of the sample code to better understand how testing on Android with appium works. There’s also a bootcamp guide.

I put the “wait for activity” to match current activity and that error is gone. But still nothing happens besides app starting.

Here is what I get:

Scenario: Settings # features\settings.feature:4
Given I wait for 8 seconds # features/step_definitions/steps.rb:6
timed out after 8 seconds (undefined method call' for nil:NilClass) (Selenium::WebDriver::Error::TimeOutError) ./features/step_definitions/steps.rb:7:in/^I wait for (\d+) seconds$/’
features\settings.feature:5:in `Given I wait for 8 seconds’
Given I enter pin code # features/step_definitions/steps.rb:11

Failing Scenarios:
cucumber features\settings.feature:4 # Scenario: Settings

1 scenario (1 failed)
2 steps (1 failed, 1 skipped)
0m34.089s

I am thinking that env.rb file needs some changes. But I maybe wrong.
I uploaded files from my feature folder structure here. I changed .rb and .feature files to _rb.txt and _feature.txt, as it won’t allow to upload otherwise.

settings_feature.txt (129 Bytes)
steps_rb.txt (270 Bytes)
appium.txt (76 Bytes)
env_rb.txt (1.3 KB)

I know for sure Android works. There’s probably an issue in your code somewhere. If you upload the tests & app to a github repo, I can take a look.