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

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

@CanIgnoreReturnValue
public Device.Builder clearApplicationReportsMetadata()

Clears applicationReportsMetadata.

clearDeviceSettings

@CanIgnoreReturnValue
public Device.Builder clearDeviceSettings()

Clears deviceSettings.

clearDeviceSettingsMetadata

@CanIgnoreReturnValue
public Device.Builder clearDeviceSettingsMetadata()

Clears deviceSettingsMetadata.

clearHardwareInfo

@CanIgnoreReturnValue
public Device.Builder clearHardwareInfo()

Clears hardwareInfo.

clearHardwareInfoMetadata

@CanIgnoreReturnValue
public Device.Builder clearHardwareInfoMetadata()

Clears hardwareInfoMetadata.

clearManagementAppPackageNameMetadata

@CanIgnoreReturnValue
public Device.Builder clearManagementAppPackageNameMetadata()

Clears managementAppPackageNameMetadata.

clearManagementModeMetadata

@CanIgnoreReturnValue
public Device.Builder clearManagementModeMetadata()

Clears managementModeMetadata.

clearNetworkInfo

@CanIgnoreReturnValue
public Device.Builder clearNetworkInfo()

Clears networkInfo.

clearNetworkInfoMetadata

@CanIgnoreReturnValue
public Device.Builder clearNetworkInfoMetadata()

Clears networkInfoMetadata.

clearOwnershipMetadata

@CanIgnoreReturnValue
public Device.Builder clearOwnershipMetadata()

Clears ownershipMetadata.

clearSoftwareInfo

@CanIgnoreReturnValue
public Device.Builder clearSoftwareInfo()

Clears softwareInfo.

clearSoftwareInfoMetadata

@CanIgnoreReturnValue
public Device.Builder clearSoftwareInfoMetadata()

Clears softwareInfoMetadata.

clearWorkProfileStateMetadata

@CanIgnoreReturnValue
public Device.Builder clearWorkProfileStateMetadata()

Clears workProfileStateMetadata.

setApplicationReports

@CanIgnoreReturnValue
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

@CanIgnoreReturnValue
public Device.Builder setApplicationReportsMetadata(Metadata value)

Metadata about application reports.

setDeviceSettings

@CanIgnoreReturnValue
public Device.Builder setDeviceSettings(DeviceSettings value)

Device settings information.

setDeviceSettingsMetadata

@CanIgnoreReturnValue
public Device.Builder setDeviceSettingsMetadata(Metadata value)

Metadata about device settings.

setHardwareInfo

@CanIgnoreReturnValue
public Device.Builder setHardwareInfo(HardwareInfo value)

Detailed information about the device hardware.

setHardwareInfoMetadata

@CanIgnoreReturnValue
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

@CanIgnoreReturnValue
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

@CanIgnoreReturnValue
public Device.Builder setManagementModeMetadata(Metadata value)

Metadata about management mode.

setNetworkInfo

@CanIgnoreReturnValue
public Device.Builder setNetworkInfo(NetworkInfo value)

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

setNetworkInfoMetadata

@CanIgnoreReturnValue
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

@CanIgnoreReturnValue
public Device.Builder setOwnershipMetadata(Metadata value)

Metadata about ownership.

setSoftwareInfo

@CanIgnoreReturnValue
public Device.Builder setSoftwareInfo(SoftwareInfo value)

Detailed information about the device software.

setSoftwareInfoMetadata

@CanIgnoreReturnValue
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

@CanIgnoreReturnValue
public Device.Builder setWorkProfileStateMetadata(Metadata value)

Metadata about work profile state.