# TileServiceCompat

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/service/quicksettings/TileServiceCompat "View this page in Java")

<br />

```
class TileServiceCompat
```

<br />

*** ** * ** ***

A helper for accessing[TileService](https://developer.android.com/reference/android/service/quicksettings/TileService.html)API methods.

## Summary

|                                    ### Public functions                                     |
|---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [startActivityAndCollapse](https://developer.android.com/reference/kotlin/androidx/core/service/quicksettings/TileServiceCompat#startActivityAndCollapse(android.service.quicksettings.TileService,androidx.core.service.quicksettings.PendingIntentActivityWrapper))`(` ` tileService: `[TileService](https://developer.android.com/reference/android/service/quicksettings/TileService.html)`,` ` wrapper: `[PendingIntentActivityWrapper](https://developer.android.com/reference/kotlin/androidx/core/service/quicksettings/PendingIntentActivityWrapper) `)` Calls the correct[TileService](https://developer.android.com/reference/android/service/quicksettings/TileService.html)#startActivityAndCollapse() method depending on the app's targeted[android.os.Build.VERSION_CODES](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html). |

## Public functions

### startActivityAndCollapse

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

```
java-static fun startActivityAndCollapse(
    tileService: TileService,
    wrapper: PendingIntentActivityWrapper
): Unit
```

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