Builder
class Builder
kotlin.Any | |
↳ | android.content.pm.PackageInstaller.PreapprovalDetails.Builder |
A builder for PreapprovalDetails
Summary
Public constructors | |
---|---|
Builder() Creates a new Builder. |
Public methods | |
---|---|
PackageInstaller.PreapprovalDetails |
build() Builds the instance. |
PackageInstaller.PreapprovalDetails.Builder |
The icon representing the app to be installed. |
PackageInstaller.PreapprovalDetails.Builder |
setLabel(value: CharSequence) The label representing the app to be installed. |
PackageInstaller.PreapprovalDetails.Builder |
The locale is used to get the app label from the APKs (includes the base APK and split APKs) related to the package to be installed. |
PackageInstaller.PreapprovalDetails.Builder |
setPackageName(value: String) The package name of the app to be installed. |
Public constructors
Public methods
build
fun build(): PackageInstaller.PreapprovalDetails
Builds the instance. This builder should not be touched after calling this!
Return | |
---|---|
PackageInstaller.PreapprovalDetails |
This value cannot be null . |
setIcon
fun setIcon(value: Bitmap): PackageInstaller.PreapprovalDetails.Builder
The icon representing the app to be installed.
Parameters | |
---|---|
value |
Bitmap: This value cannot be null . |
Return | |
---|---|
PackageInstaller.PreapprovalDetails.Builder |
This value cannot be null . |
setLabel
fun setLabel(value: CharSequence): PackageInstaller.PreapprovalDetails.Builder
The label representing the app to be installed.
Parameters | |
---|---|
value |
CharSequence: This value cannot be null . |
Return | |
---|---|
PackageInstaller.PreapprovalDetails.Builder |
This value cannot be null . |
setLocale
fun setLocale(value: ULocale): PackageInstaller.PreapprovalDetails.Builder
The locale is used to get the app label from the APKs (includes the base APK and split APKs) related to the package to be installed. The caller needs to make sure the app label is consistent with the app label of PreapprovalDetails
when validating the installation. Otherwise, the pre-approval install session will fail.
Parameters | |
---|---|
value |
ULocale: This value cannot be null . |
Return | |
---|---|
PackageInstaller.PreapprovalDetails.Builder |
This value cannot be null . |
setPackageName
fun setPackageName(value: String): PackageInstaller.PreapprovalDetails.Builder
The package name of the app to be installed.
Parameters | |
---|---|
value |
String: This value cannot be null . |
Return | |
---|---|
PackageInstaller.PreapprovalDetails.Builder |
This value cannot be null . |