# ProcessCompat

# ProcessCompat

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

*** ** * ** ***

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

<br />

```
class ProcessCompat
```

<br />

*** ** * ** ***

Helper for accessing features in[Process](https://developer.android.com/reference/android/os/Process.html).

## Summary

|                                       ### Public functions                                        |
|---------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [isApplicationUid](https://developer.android.com/reference/kotlin/androidx/core/os/ProcessCompat#isApplicationUid(int))`(uid: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Returns whether the given`uid`belongs to an application. |

## Public functions

### isApplicationUid

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

```
java-static fun isApplicationUid(uid: Int): Boolean
```

Returns whether the given`uid`belongs to an application. Compatibility behavior:

- SDK 24 and above, this method matches platform behavior.
- SDK 23 and earlier, this method is a best-effort to match platform behavior, but may default to returning`true`if an accurate result is not available.

|                                     Parameters                                     |
|------------------------------------------------------------------------------------|--------------|
| `uid: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | a kernel uid |

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | `true`if the uid corresponds to an application sandbox running in a specific user,`false`if the uid corresponds to an isolated user ID process or does not otherwise correspond to an application user ID, or a value based on platform-specific fallback behavior |