Metadata-Version: 2.4
Name: autodroid
Version: 2.1
Summary: A python module to automate android
Author: turkishcoder
Description-Content-Type: text/markdown
Requires-Dist: os
Requires-Dist: requests
Requires-Dist: zipfile
Requires-Dist: subprocess
Requires-Dist: datetime
Dynamic: author
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-dist
Dynamic: summary

# Autodroid

> pip install autodroid

## Usage

### swipe()

`swipe(x1, y1, x2, y2, duration)`
x1, y1, x2, y2 = position, from - to (must be integer)
duration = amount of time swiped (in milliseconds not seconds)

*Example:*

```python
swipe(520, 1730, 520, 400, 1000)
```

### tap()

`tap(x, y)`
x, y = position (must be integer)

*Example:*

```python
tap(173, 200)
```

### screenshot()

`screenshot()`
saves to `/sdcard/autodroid/screencap`

### holdtap()

`holdtap(x, y, duration)`
x, y = position (must be integer)
duration = amount of time held (in milliseconds)

*Example:*

```python
holdtap(167, 853, 4000)
```

### type()

`type(text)`
text = the text you want to type (must be string)

*Example:*

```python
type("hello world")
```

### checkConnected()

`checkConnected()` prints the connected device S/N

### scrcpy()

`scrcpy()` starts a session of scrcpy

### key()

`key(key)` executes a key event

| Key Name    | Alternate Names  | Key Code |
| ----------- | ---------------- | -------- |
| Home        | –                | 3        |
| Back        | –                | 4        |
| Recent Apps | recent, recents  | 187      |
| Power       | pwr              | 26       |
| Volume Up   | v_up, vol_up     | 24       |
| Volume Down | v_down, vol_down | 25       |
| Mute        | –                | 164      |
| Media Play  | mplay, play      | 85       |
| Wake        | wakeup           | 224      |

*Example:*

```python
key("pwr")
```

> Not recommended to use
