# TileServiceCompat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/service/quicksettings/TileServiceCompat.java+class:androidx.core.service.quicksettings.TileServiceCompat) Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)

*** ** * ** ***


```
public class TileServiceCompat
```

<br />

*** ** * ** ***

A helper for accessing `https://developer.android.com/reference/android/service/quicksettings/TileService.html` API methods.

## Summary

| ### Public methods |
|---|---|
| `static void` | `https://developer.android.com/reference/androidx/core/service/quicksettings/TileServiceCompat#startActivityAndCollapse(android.service.quicksettings.TileService,androidx.core.service.quicksettings.PendingIntentActivityWrapper)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/service/quicksettings/TileService.html tileService, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/service/quicksettings/PendingIntentActivityWrapper wrapper )` Calls the correct `https://developer.android.com/reference/android/service/quicksettings/TileService.html`#startActivityAndCollapse() method depending on the app's targeted `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html`. |

## Public methods

### startActivityAndCollapse

Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)

```
public static void startActivityAndCollapse(
    @NonNull TileService tileService,
    @NonNull PendingIntentActivityWrapper wrapper
)
```

Calls the correct `https://developer.android.com/reference/android/service/quicksettings/TileService.html`#startActivityAndCollapse() method depending on the app's targeted `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html`.