PackageInfoBuilder
class PackageInfoBuilder
Builder for PackageInfo.
Summary
Public functions |
|
|---|---|
PackageInfoBuilder! |
addRequestedPermission(Adds a requested permission and its flag for the app. |
PackageInfo! |
build()Returns a |
java-static PackageInfoBuilder! |
Start building a new |
PackageInfoBuilder! |
setApplicationInfo(applicationInfo: ApplicationInfo!)Sets the application info. |
PackageInfoBuilder! |
setPackageName(packageName: String!)Sets the package name. |
PackageInfoBuilder! |
@TargetApi(value = Build.VERSION_CODES.P)Sets the version code. |
PackageInfoBuilder! |
setVersionName(versionName: String!)Sets the version name. |
Public functions
addRequestedPermission
fun addRequestedPermission(
requestedPermission: String!,
requestedPermissionFlag: Int
): PackageInfoBuilder!
Adds a requested permission and its flag for the app.
This can be called several times to add multiple permissions.
newBuilder
java-static fun newBuilder(): PackageInfoBuilder!
Start building a new PackageInfo.
| Returns | |
|---|---|
PackageInfoBuilder! |
a new instance of |
setApplicationInfo
fun setApplicationInfo(applicationInfo: ApplicationInfo!): PackageInfoBuilder!
Sets the application info.
Default is null
| See also | |
|---|---|
applicationInfo |
setPackageName
fun setPackageName(packageName: String!): PackageInfoBuilder!
Sets the package name.
Default is null.
| See also | |
|---|---|
packageName |
setVersionCode
@TargetApi(value = Build.VERSION_CODES.P)
fun setVersionCode(longVersionCode: Long): PackageInfoBuilder!
Sets the version code.
On SDK P+, this value will be returned for both getLongVersionCode and versionCode. Note that the value of versionCode will be truncated if a value larger than Integer.MAX_VALUE is provided.
Default is 0L.
| See also | |
|---|---|
setLongVersionCode |
|
versionCode |
setVersionName
fun setVersionName(versionName: String!): PackageInfoBuilder!
Sets the version name.
Default is null.
| See also | |
|---|---|
versionName |