device_api-android 1.2.10 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/lib/device_api/android/device.rb +1 -1
- data/lib/device_api/android/device/kindle.rb +7 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b60870bbe796b5e2159978faead21a5260f4d9f
|
4
|
+
data.tar.gz: a6eff328f6783300d43e12fe42037fd3e573643d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 519fcb4f8f592fdcc7980ad36c73c84983d70e4a17b82c21c3720b66fd9b1b568a612e451b162fec8e6791052ad09b7933c783ccf7e035a892aa8ca614aa774f
|
7
|
+
data.tar.gz: 0dea576c56c809f100b62796756798cc24d1e0d5ccfeccc9bc2186384ddd6d4c03bcbe2bfef5e3b52e1c51278ffd8c3f2582435d77381849d26f375656441045
|
data/README.md
CHANGED
@@ -45,13 +45,15 @@ You can use device.is_remote? to determine if the device is a remote device, e.g
|
|
45
45
|
|
46
46
|
device.is_remote?
|
47
47
|
|
48
|
-
|
48
|
+
### Error messages
|
49
49
|
|
50
|
-
|
50
|
+
Here are some of the errors you may encounter as well as a example of what can cause them:
|
51
51
|
|
52
|
-
DeviceAPI::Android::
|
52
|
+
`DeviceAPI::Android::ADB::DeviceAlreadyConnectedError` - raised when DeviceAPI::Android.connect is called on an currently connected device.
|
53
53
|
|
54
|
-
DeviceAPI::Android::
|
54
|
+
`DeviceAPI::Android::DeviceDisconnectedWhenNotARemoteDevice` - raised when we are attempting to call disconnect on a non-remote device.
|
55
|
+
|
56
|
+
`DeviceAPI::Android::ADBCommandError` - raised when we cannot connect to a device, e.g. adb times out.
|
55
57
|
|
56
58
|
### Detecting devices
|
57
59
|
|
@@ -7,12 +7,16 @@ module DeviceAPI
|
|
7
7
|
# work due to Amazons implementation of the Keyguard.
|
8
8
|
def unlock
|
9
9
|
ADB.keyevent(qualifier, '26') unless screen_on?
|
10
|
+
|
11
|
+
return ADB.swipe(qualifier, {x_from: 900, y_from: 500, x_to: 300, y_to: 500}) if version.split('.').first.to_i < 5
|
12
|
+
|
10
13
|
if orientation == :landscape
|
11
|
-
|
12
|
-
ADB.swipe(qualifier, { x_from: 900, y_from: 500, x_to: 300, y_to: 500 } ) if version.split('.').first.to_i < 5
|
14
|
+
coords = { x_from: 500, y_from: 750, x_to: 500, y_to: 250 }
|
13
15
|
else
|
14
|
-
|
16
|
+
coords = { x_from: 300, y_from: 900, x_to: 300, y_to: 600 }
|
15
17
|
end
|
18
|
+
|
19
|
+
ADB.swipe(qualifier, coords)
|
16
20
|
end
|
17
21
|
end
|
18
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: device_api-android
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Buckhurst
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-10-
|
14
|
+
date: 2016-10-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: device_api
|
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
81
|
rubyforge_project:
|
82
|
-
rubygems_version: 2.5.
|
82
|
+
rubygems_version: 2.5.0
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: Android Device Management API
|