<commit_before>[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
# Toggle Data

Switch the state of data service
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
## Example Usage

```java
// Java
driver.toggleData();

```

```python
# Not supported
```

```javascript
// Javascript
// webdriver.io example
driver.toggleData();

// wd example
await driver.toggleData();

```

```ruby
# Ruby
# ruby_lib example
toggle_data

# ruby_lib_core example
@driver.toggle_data

```

```php
# PHP
// TODO

```

```csharp
// C#
// TODO

```


[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
## Support

[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
### Appium Server

|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|--------|----------------|------|--------------|--------------|
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | None | None | None |
|  | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | None | None | None |
| Android | [Espresso](/docs/en/drivers/android-espresso.md) | ?+ | 1.9.0+ | All |<commit_msg>Update generated docs [ci skip] (#12465)<commit_after>[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
# Toggle Data

Switch the state of data service
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
## Example Usage

```java
// Java
driver.toggleData();

```

```python
# Not supported
```

```javascript
// Javascript
// webdriver.io example
driver.toggleData();

// wd example
await driver.toggleData();

```

```ruby
# Ruby
# ruby_lib example
toggle_data

# ruby_lib_core example
@driver.toggle_data

```

```php
# PHP
// TODO

```

```csharp
// C#
// TODO

```

[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
## Description

Switch the state of data service.

(For Android) This API does not work for Android API level 21+
because it requires system or carrier privileged permission, and Android <= 21 does not support granting permissions.


[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
## Support

[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
### Appium Server

|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|--------|----------------|------|--------------|--------------|
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | None | None | None |
|  | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | None | None | None |
| Android | [Espresso](/docs/en/drivers/android-espresso.md) | ?+ | 1.9.0+ | All |
{'fraction_non_alphanumeric': 0.17780429594272076, 'fraction_numerical': 0.004474940334128878, 'mean_word_length': 3.4176548089591567, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7383033', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1043, 'n_words': 313}