# In-App Experiences for the Capacitor Plugin

Pause, resume, and control display timing for In-App Experiences.

In-App Experiences are automatically enabled when you integrate the Airship SDK. Use these methods to control when and how they are displayed.

## Pausing and Resuming Display

You can pause and resume In-App Experiences to control when they are displayed to users.

```typescript
// Pause in-app experiences
await Airship.inApp.setPaused(true)

// Resume in-app experiences
await Airship.inApp.setPaused(false)

// Check if paused
const isPaused = await Airship.inApp.isPaused()
```


### Auto-Pause on Launch

You can configure the SDK to automatically pause In-App Experiences on launch. This is useful if you want to defer showing In-App Experiences until after onboarding or other critical app flows.

```typescript
await Airship.takeOff({
  production: {
    appKey: "<APP_KEY>",
    appSecret: "<APP_SECRET>"
  },
  development: {
    appKey: "<APP_KEY>",
    appSecret: "<APP_SECRET>"
  },
  inProduction: true,
  site: "us",
  autoPauseInAppAutomationOnLaunch: true
})
```


See the [Capacitor Plugin Setup guide](https://www.airship.com/docs/developer/sdk-integration/capacitor/installation/getting-started/) for complete `takeOff` configuration options.

When you're ready to display In-App Experiences, call `setPaused(false)`:

```typescript
await Airship.inApp.setPaused(false)
```


## Display Interval

Control the minimum time between In-App Experience displays to avoid overwhelming users.

```typescript
// Set display interval to 5 seconds
await Airship.inApp.setDisplayInterval(5000)

// Get current display interval
const interval = await Airship.inApp.getDisplayInterval()
```


The display interval is the minimum time (in milliseconds) that must pass between displaying In-App Experiences.

