Device.Builder

public abstract class Device.Builder


Builder for Device.

Summary

Public methods

abstract Device
Device.Builder

Clears applicationReportsMetadata.

Device.Builder

Clears deviceSettings.

Device.Builder

Clears deviceSettingsMetadata.

Device.Builder

Clears hardwareInfo.

Device.Builder

Clears hardwareInfoMetadata.

Device.Builder

Clears managementAppPackageNameMetadata.

Device.Builder

Clears managementModeMetadata.

Device.Builder

Clears managementProviderInfo.

Device.Builder

Clears managementProviderInfoMetadata.

Device.Builder

Clears networkInfo.

Device.Builder

Clears networkInfoMetadata.

Device.Builder

Clears ownershipMetadata.

Device.Builder

Clears softwareInfo.

Device.Builder

Clears softwareInfoMetadata.

Device.Builder

Clears workProfileStateMetadata.

Device.Builder

Reports for apps installed on the device.

Device.Builder

Metadata about application reports.

Device.Builder

Device settings information.

Device.Builder

Metadata about device settings.

Device.Builder

Detailed information about the device hardware.

Device.Builder

Metadata about hardware info.

abstract Device.Builder

The package name of the app that manages the device.

Device.Builder

Metadata about management app package name.

abstract Device.Builder

The type of management mode on the device.

Device.Builder

Metadata about management mode.

Device.Builder

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

Device.Builder

Metadata about management provider info.

Device.Builder

Device network information.

Device.Builder

Metadata about network info.

abstract Device.Builder

Ownership of the managed device.

Device.Builder

Metadata about ownership.

Device.Builder

Detailed information about the device software.

Device.Builder

Metadata about software info.

abstract Device.Builder

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

Device.Builder

Metadata about work profile state.

Public methods

build

public abstract Device build()

clearApplicationReportsMetadata

public Device.Builder clearApplicationReportsMetadata()

Clears applicationReportsMetadata.

clearDeviceSettings

public Device.Builder clearDeviceSettings()

Clears deviceSettings.

clearDeviceSettingsMetadata

public Device.Builder clearDeviceSettingsMetadata()

Clears deviceSettingsMetadata.

clearHardwareInfo

public Device.Builder clearHardwareInfo()

Clears hardwareInfo.

clearHardwareInfoMetadata

public Device.Builder clearHardwareInfoMetadata()

Clears hardwareInfoMetadata.

clearManagementAppPackageNameMetadata

public Device.Builder clearManagementAppPackageNameMetadata()

Clears managementAppPackageNameMetadata.

clearManagementModeMetadata

public Device.Builder clearManagementModeMetadata()

Clears managementModeMetadata.

clearManagementProviderInfo

public Device.Builder clearManagementProviderInfo()

Clears managementProviderInfo.

clearManagementProviderInfoMetadata

public Device.Builder clearManagementProviderInfoMetadata()

Clears managementProviderInfoMetadata.

clearNetworkInfo

public Device.Builder clearNetworkInfo()

Clears networkInfo.

clearNetworkInfoMetadata

public Device.Builder clearNetworkInfoMetadata()

Clears networkInfoMetadata.

clearOwnershipMetadata

public Device.Builder clearOwnershipMetadata()

Clears ownershipMetadata.

clearSoftwareInfo

public Device.Builder clearSoftwareInfo()

Clears softwareInfo.

clearSoftwareInfoMetadata

public Device.Builder clearSoftwareInfoMetadata()

Clears softwareInfoMetadata.

clearWorkProfileStateMetadata

public Device.Builder clearWorkProfileStateMetadata()

Clears workProfileStateMetadata.

setApplicationReports

public Device.Builder setApplicationReports(Iterable<ApplicationReport> value)

Reports for apps installed on the device.

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

setApplicationReportsMetadata

public Device.Builder setApplicationReportsMetadata(Metadata value)

Metadata about application reports.

setDeviceSettings

public Device.Builder setDeviceSettings(DeviceSettings value)

Device settings information.

setDeviceSettingsMetadata

public Device.Builder setDeviceSettingsMetadata(Metadata value)

Metadata about device settings.

setHardwareInfo

public Device.Builder setHardwareInfo(HardwareInfo value)

Detailed information about the device hardware.

setHardwareInfoMetadata

public Device.Builder setHardwareInfoMetadata(Metadata value)

Metadata about hardware info.

setManagementAppPackageName

public abstract Device.Builder setManagementAppPackageName(String value)

The package name of the app that manages the device.

setManagementAppPackageNameMetadata

public Device.Builder setManagementAppPackageNameMetadata(Metadata value)

Metadata about management app package name.

setManagementMode

public abstract Device.Builder setManagementMode(Device.ManagementMode value)

The type of management mode on the device.

setManagementModeMetadata

public Device.Builder setManagementModeMetadata(Metadata value)

Metadata about management mode.

setManagementProviderInfo

public Device.Builder setManagementProviderInfo(ManagementProviderInfo value)

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

setManagementProviderInfoMetadata

public Device.Builder setManagementProviderInfoMetadata(Metadata value)

Metadata about management provider info.

setNetworkInfo

public Device.Builder setNetworkInfo(NetworkInfo value)

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

setNetworkInfoMetadata

public Device.Builder setNetworkInfoMetadata(Metadata value)

Metadata about network info.

setOwnership

public abstract Device.Builder setOwnership(Device.Ownership value)

Ownership of the managed device.

setOwnershipMetadata

public Device.Builder setOwnershipMetadata(Metadata value)

Metadata about ownership.

setSoftwareInfo

public Device.Builder setSoftwareInfo(SoftwareInfo value)

Detailed information about the device software.

setSoftwareInfoMetadata

public Device.Builder setSoftwareInfoMetadata(Metadata value)

Metadata about software info.

setWorkProfileState

public abstract Device.Builder setWorkProfileState(Device.WorkProfileState value)

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`.

setWorkProfileStateMetadata

public Device.Builder setWorkProfileStateMetadata(Metadata value)

Metadata about work profile state.