Device

abstract class Device


Information about the device.

Summary

Nested types

abstract class Device.Builder

Builder for Device.

The type of management mode on the device.

Ownership of the managed device.

State that indicates if there is a work profile on the device.

Public functions

java-static Device.Builder!
abstract ImmutableList<ApplicationReport!>!

Reports for apps installed on the device.

Metadata!

Metadata about application reports.

java-static Device!
DeviceSettings!

Device settings information.

Metadata!

Metadata about device settings.

HardwareInfo!

Detailed information about the device hardware.

Metadata!

Metadata about hardware info.

abstract String!

The package name of the app that manages the device.

Metadata!

Metadata about management app package name.

abstract Device.ManagementMode!

The type of management mode on the device.

Metadata!

Metadata about management mode.

ManagementProviderInfo!

Information about the management provider of an AMAPI-managed device.

Metadata!

Metadata about management provider info.

NetworkInfo!

Device network information.

Metadata!

Metadata about network info.

abstract Device.Ownership!

Ownership of the managed device.

Metadata!

Metadata about ownership.

SoftwareInfo!

Detailed information about the device software.

Metadata!

Metadata about software info.

abstract Device.WorkProfileState!

State that indicates if there is a work profile on the device.

Metadata!

Metadata about work profile state.

Boolean

Returns true if applicationReportsMetadata is set.

Boolean

Returns true if deviceSettings is set.

Boolean

Returns true if deviceSettingsMetadata is set.

Boolean

Returns true if hardwareInfo is set.

Boolean

Returns true if hardwareInfoMetadata is set.

Boolean

Returns true if managementAppPackageNameMetadata is set.

Boolean

Returns true if managementModeMetadata is set.

Boolean

Returns true if managementProviderInfo is set.

Boolean

Returns true if managementProviderInfoMetadata is set.

Boolean

Returns true if networkInfo is set.

Boolean

Returns true if networkInfoMetadata is set.

Boolean

Returns true if ownershipMetadata is set.

Boolean

Returns true if softwareInfo is set.

Boolean

Returns true if softwareInfoMetadata is set.

Boolean

Returns true if workProfileStateMetadata is set.

abstract Device.Builder!

Public functions

builder

java-static fun builder(): Device.Builder!

getApplicationReports

abstract fun getApplicationReports(): ImmutableList<ApplicationReport!>!

Reports for apps installed on the device.

Note: This returns all apps to extensibility apps on managed devices, otherwise this only returns critical apps.

getApplicationReportsMetadata

fun getApplicationReportsMetadata(): Metadata!

Metadata about application reports.

getDefaultInstance

java-static fun getDefaultInstance(): Device!

getDeviceSettings

fun getDeviceSettings(): DeviceSettings!

Device settings information.

getDeviceSettingsMetadata

fun getDeviceSettingsMetadata(): Metadata!

Metadata about device settings.

getHardwareInfo

fun getHardwareInfo(): HardwareInfo!

Detailed information about the device hardware.

getHardwareInfoMetadata

fun getHardwareInfoMetadata(): Metadata!

Metadata about hardware info.

getManagementAppPackageName

abstract fun getManagementAppPackageName(): String!

The package name of the app that manages the device.

getManagementAppPackageNameMetadata

fun getManagementAppPackageNameMetadata(): Metadata!

Metadata about management app package name.

getManagementMode

abstract fun getManagementMode(): Device.ManagementMode!

The type of management mode on the device.

getManagementModeMetadata

fun getManagementModeMetadata(): Metadata!

Metadata about management mode.

getManagementProviderInfo

fun getManagementProviderInfo(): ManagementProviderInfo!

Information about the management provider of an AMAPI-managed device. This is not set for custom DPC managed devices.

getManagementProviderInfoMetadata

fun getManagementProviderInfoMetadata(): Metadata!

Metadata about management provider info.

getNetworkInfo

fun getNetworkInfo(): NetworkInfo!

Device network information. This requires the caller to have the ACCESS_NETWORK_STATE permission.

getNetworkInfoMetadata

fun getNetworkInfoMetadata(): Metadata!

Metadata about network info.

getOwnership

abstract fun getOwnership(): Device.Ownership!

Ownership of the managed device.

getOwnershipMetadata

fun getOwnershipMetadata(): Metadata!

Metadata about ownership.

getSoftwareInfo

fun getSoftwareInfo(): SoftwareInfo!

Detailed information about the device software.

getSoftwareInfoMetadata

fun getSoftwareInfoMetadata(): Metadata!

Metadata about software info.

getWorkProfileState

abstract fun getWorkProfileState(): Device.WorkProfileState!

State that indicates if there is a work profile on the device. In contrast, `Ownership` and `ManagementMode` indicate the management status of the user in which the calling app is running.

* On Android 13 and above, this signal reliably detects the presence of a work profile. * On Android 12 and below, the presence of a work profile can be reliably detected if it's managed by the Android Device Policy app or if the calling app is inside the work profile. Reports `WORK_PROFILE_STATE_UNSPECIFIED` if the presence of a work profile cannot be reliably determined. In such cases, the corresponding metadata will include `Metadata.IssueType.SIGNAL_UNDETERMINED`.

getWorkProfileStateMetadata

fun getWorkProfileStateMetadata(): Metadata!

Metadata about work profile state.

hasApplicationReportsMetadata

fun hasApplicationReportsMetadata(): Boolean

Returns true if applicationReportsMetadata is set.

hasDeviceSettings

fun hasDeviceSettings(): Boolean

Returns true if deviceSettings is set.

hasDeviceSettingsMetadata

fun hasDeviceSettingsMetadata(): Boolean

Returns true if deviceSettingsMetadata is set.

hasHardwareInfo

fun hasHardwareInfo(): Boolean

Returns true if hardwareInfo is set.

hasHardwareInfoMetadata

fun hasHardwareInfoMetadata(): Boolean

Returns true if hardwareInfoMetadata is set.

hasManagementAppPackageNameMetadata

fun hasManagementAppPackageNameMetadata(): Boolean

Returns true if managementAppPackageNameMetadata is set.

hasManagementModeMetadata

fun hasManagementModeMetadata(): Boolean

Returns true if managementModeMetadata is set.

hasManagementProviderInfo

fun hasManagementProviderInfo(): Boolean

Returns true if managementProviderInfo is set.

hasManagementProviderInfoMetadata

fun hasManagementProviderInfoMetadata(): Boolean

Returns true if managementProviderInfoMetadata is set.

hasNetworkInfo

fun hasNetworkInfo(): Boolean

Returns true if networkInfo is set.

hasNetworkInfoMetadata

fun hasNetworkInfoMetadata(): Boolean

Returns true if networkInfoMetadata is set.

hasOwnershipMetadata

fun hasOwnershipMetadata(): Boolean

Returns true if ownershipMetadata is set.

hasSoftwareInfo

fun hasSoftwareInfo(): Boolean

Returns true if softwareInfo is set.

hasSoftwareInfoMetadata

fun hasSoftwareInfoMetadata(): Boolean

Returns true if softwareInfoMetadata is set.

hasWorkProfileStateMetadata

fun hasWorkProfileStateMetadata(): Boolean

Returns true if workProfileStateMetadata is set.

toBuilder

abstract fun toBuilder(): Device.Builder!