> For the complete documentation index, see [llms.txt](https://docs.appetize.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appetize.io/guides-and-samples/swipe-a-pattern-to-unlock-an-android-device.md).

# Unlock Device

```javascript
const session = await client.startSession()

// Swipe in a square pattern starting at the given element
await session.swipe(
   new window.appetize.SwipeGesture()
    .from({
       'resource-id': 'passcode_unlock'
    })
    .to(0, 100)
    .to(40, 100)
    .to(40, 200)
    .to(0, 200)
    .to(0, 100)
)
```
