Class: DeviceAPI::Android::Kindle
- Defined in:
- lib/device_api/android/device/kindle.rb
Overview
Kindle specific device class
Instance Method Summary collapse
-
#unlock ⇒ Object
On non-Kindle devices, if a device is locked without a password (i.e. ‘Swipe to unlock’), then you can unlock that device by broadcasting a ‘WakeUp’ intent.
Methods inherited from Device
#app_version_number, #battery, #battery_info, #battery_level, #block_package, create, #device, #diskstat, #dpi, #imei, inherited, #initialize, #install, #intent, #ip_address, #list_installed_packages, #manufacturer, #memory, #model, #monkey, #orientation, #package_name, #powered?, #range, #reboot, #screen_on?, #screenshot, #status, #type, #uninstall, #uptime, #version, #wifi_mac_address, #wifi_status
Constructor Details
This class inherits a constructor from DeviceAPI::Android::Device
Instance Method Details
#unlock ⇒ Object
On non-Kindle devices, if a device is locked without a password (i.e. ‘Swipe to unlock’), then you can unlock that device by broadcasting a ‘WakeUp’ intent. On Kindle devices, this does not work due to Amazons implementation of the Keyguard.
8 9 10 11 |
# File 'lib/device_api/android/device/kindle.rb', line 8 def unlock ADB.keyevent(serial, '26') unless screen_on? ADB.swipe(serial, { x_from: 900, x_to: 300, y_from: 100, y_to: 100 } ) end |