Class AndroidInstallApplicationOptions
- java.lang.Object
-
- io.appium.java_client.appmanagement.BaseOptions<T>
-
- io.appium.java_client.appmanagement.BaseInstallApplicationOptions<AndroidInstallApplicationOptions>
-
- io.appium.java_client.android.appmanagement.AndroidInstallApplicationOptions
-
public class AndroidInstallApplicationOptions extends BaseInstallApplicationOptions<AndroidInstallApplicationOptions>
-
-
Constructor Summary
Constructors Constructor Description AndroidInstallApplicationOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
build()
Creates a map based on the provided options.AndroidInstallApplicationOptions
withAllowTestPackagesDisabled()
Disables a possibility to install packages marked as test in the manifest (the default setting).AndroidInstallApplicationOptions
withAllowTestPackagesEnabled()
Allows to install packages marked as test in the manifest.AndroidInstallApplicationOptions
withGrantPermissionsDisabled()
Does not grant all the permissions requested in the application's manifest automatically after the installation is completed (the default behavior).AndroidInstallApplicationOptions
withGrantPermissionsEnabled()
Grants all the permissions requested in the application's manifest automatically after the installation is completed under Android 6+.AndroidInstallApplicationOptions
withReplaceDisabled()
Disables the possibility to upgrade/reinstall the application if it is already present on the device.AndroidInstallApplicationOptions
withReplaceEnabled()
Enables the possibility to upgrade/reinstall the application if it is already present on the device (the default behavior).AndroidInstallApplicationOptions
withTimeout(java.time.Duration timeout)
The time to wait until the app is installed (60000ms by default).AndroidInstallApplicationOptions
withUseSdcardDisabled()
Forces the application to be installed to the internal memory (the default behavior).AndroidInstallApplicationOptions
withUseSdcardEnabled()
Forces the application to be installed of SD card instead of the internal memory.
-
-
-
Method Detail
-
withReplaceEnabled
public AndroidInstallApplicationOptions withReplaceEnabled()
Enables the possibility to upgrade/reinstall the application if it is already present on the device (the default behavior).- Returns:
- self instance for chaining.
-
withReplaceDisabled
public AndroidInstallApplicationOptions withReplaceDisabled()
Disables the possibility to upgrade/reinstall the application if it is already present on the device.- Returns:
- self instance for chaining.
-
withTimeout
public AndroidInstallApplicationOptions withTimeout(java.time.Duration timeout)
The time to wait until the app is installed (60000ms by default).- Parameters:
timeout
- the actual timeout value. The minimum time resolution unit is one millisecond.- Returns:
- self instance for chaining.
-
withAllowTestPackagesEnabled
public AndroidInstallApplicationOptions withAllowTestPackagesEnabled()
Allows to install packages marked as test in the manifest.- Returns:
- self instance for chaining.
-
withAllowTestPackagesDisabled
public AndroidInstallApplicationOptions withAllowTestPackagesDisabled()
Disables a possibility to install packages marked as test in the manifest (the default setting).- Returns:
- self instance for chaining.
-
withUseSdcardEnabled
public AndroidInstallApplicationOptions withUseSdcardEnabled()
Forces the application to be installed of SD card instead of the internal memory.- Returns:
- self instance for chaining.
-
withUseSdcardDisabled
public AndroidInstallApplicationOptions withUseSdcardDisabled()
Forces the application to be installed to the internal memory (the default behavior).- Returns:
- self instance for chaining.
-
withGrantPermissionsEnabled
public AndroidInstallApplicationOptions withGrantPermissionsEnabled()
Grants all the permissions requested in the application's manifest automatically after the installation is completed under Android 6+.- Returns:
- self instance for chaining.
-
withGrantPermissionsDisabled
public AndroidInstallApplicationOptions withGrantPermissionsDisabled()
Does not grant all the permissions requested in the application's manifest automatically after the installation is completed (the default behavior).- Returns:
- self instance for chaining.
-
build
public java.util.Map<java.lang.String,java.lang.Object> build()
Description copied from class:BaseOptions
Creates a map based on the provided options.- Specified by:
build
in classBaseOptions<AndroidInstallApplicationOptions>
- Returns:
- options mapping.
-
-