Stay organized with collections
Save and categorize content based on your preferences.
Credentials
open class Credentials
A class for representing UNIX credentials passed via ancillary data on UNIX domain sockets. See "man 7 unix" on a desktop linux distro.
Summary
Public constructors
Credentials
Credentials(
pid: Int,
uid: Int,
gid: Int)
Public methods
getGid
open fun getGid(): Int
getPid
open fun getPid(): Int
getUid
open fun getUid(): Int
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Credentials\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nCredentials\n===========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/net/Credentials \"View this page in Java\") \n\n```\nopen class Credentials\n```\n\n|---|------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.net.Credentials](#) |\n\nA class for representing UNIX credentials passed via ancillary data on UNIX domain sockets. See \"man 7 unix\" on a desktop linux distro.\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Credentials](#Credentials(kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`pid:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `uid:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `gid:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` \u003cbr /\u003e |\n\n| Public methods ||\n|---------------------------------------------------------------------------------|--------------------------------|\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getGid](#getGid())`()` \u003cbr /\u003e |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getPid](#getPid())`()` \u003cbr /\u003e |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getUid](#getUid())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### Credentials\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nCredentials(\n pid: Int, \n uid: Int, \n gid: Int)\n```\n\nPublic methods\n--------------\n\n### getGid\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getGid(): Int\n``` \n\n### getPid\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getPid(): Int\n``` \n\n### getUid\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getUid(): Int\n```"]]