module Appium::Core::Base::Device::AppState

def app_state(app_id)

def app_state(app_id)
  # appId is for android, bundleId is for ios.
  response = execute_script 'mobile:queryAppState', { 'appId': app_id, 'bundleId': app_id }
  case response
  when 0, 1, 2, 3, 4
    STATUS[response]
  else
    ::Appium::Logger.debug("Unexpected status in app_state: #{response}")
    response
  end
end