Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
piotruela committed Jul 11, 2024
1 parent 5950bfc commit 68c7be5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/native/feature-parity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impossible to reach 100%. macOS support is still in alpha, so it has no native f
| [Toggle cellular] ||||
| [Toggle Wi-Fi] ||||
| [Toggle Bluetooth] | ✅ see [#282] |||
| Toggle location |see [#283] | ✅ see [#326] ||
| Toggle location | | ✅ see [#326] ||
| [Tap] ||||
| [Double tap] ||||
| [Tap at coordinate] ||||
Expand Down
4 changes: 4 additions & 0 deletions packages/patrol/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased

- Implement `enableLocation` and `disableLocation` methods for Android. (#2259)

## 3.9.0

- Add privacy manifest for Apple.
Expand Down
12 changes: 12 additions & 0 deletions packages/patrol/lib/src/native/native_automator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,23 @@ class NativeAutomator {
}

/// Enables location.
///
/// On Android, opens the location settings screen and toggles the location
/// switch to enable location.
/// If the location already enabled, it does nothing.
///
/// Doesn't work for iOS.
Future<void> enableLocation() async {
await _wrapRequest('enableLocation', _client.enableLocation);
}

/// Disables location.
///
/// On Android, opens the location settings screen and toggles the location
/// switch to disable location.
/// If the location already enabled, it does nothing.
///
/// Doesn't work for iOS.
Future<void> disableLocation() async {
await _wrapRequest('disableLocation', _client.disableLocation);
}
Expand Down
12 changes: 12 additions & 0 deletions packages/patrol/lib/src/native/native_automator2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,23 @@ class NativeAutomator2 {
}

/// Enables location.
///
/// On Android, opens the location settings screen and toggles the location
/// switch to enable location.
/// If the location already enabled, it does nothing.
///
/// Doesn't work for iOS.
Future<void> enableLocation() async {
await _wrapRequest('enableLocation', _client.enableLocation);
}

/// Disables location.
///
/// On Android, opens the location settings screen and toggles the location
/// switch to disable location.
/// If the location already enabled, it does nothing.
///
/// Doesn't work for iOS.
Future<void> disableLocation() async {
await _wrapRequest('disableLocation', _client.disableLocation);
}
Expand Down

0 comments on commit 68c7be5

Please sign in to comment.