SplitApkInstaller

public class SplitApkInstaller
extends SplitApkInstallerBase

java.lang.Object
   ↳ com.android.tradefed.device.server.SplitApkInstallerBase
     ↳ com.android.tradefed.device.server.SplitApkInstaller


Summary

Public methods

static SplitApkInstaller create(IDevice device, apks, boolean reInstall, installOptions)

Returns a SplitApkInstaller for the given list of APK files from host to the given device.

static SplitApkInstaller create(IDevice device, String applicationId, apks, boolean reInstall, installOptions)

Returns a SplitApkInstaller to install given list of APK files from host to an existing application on the given device.

InstallMetrics install(long timeout, TimeUnit unit)

Installs an Android application made of several APK files by streaming from files on host

Protected methods

boolean uploadApk(String sessionId, File fileToUpload, int uniqueId, long timeout, TimeUnit unit)

Public methods

create

public static SplitApkInstaller create (IDevice device, 
                 apks, 
                boolean reInstall, 
                 installOptions)

Returns a SplitApkInstaller for the given list of APK files from host to the given device.

Parameters
device IDevice: the device to install APK, must include at least the main APK.

apks : list of APK files.

reInstall boolean: whether to enable reinstall option.

installOptions

Returns
SplitApkInstaller

create

public static SplitApkInstaller create (IDevice device, 
                String applicationId, 
                 apks, 
                boolean reInstall, 
                 installOptions)

Returns a SplitApkInstaller to install given list of APK files from host to an existing application on the given device.

Parameters
device IDevice: the device to install APK.

applicationId String: the application id of the existing application that to install new APKs with.

apks : list of APK files.

reInstall boolean: whether to enable reinstall option.

installOptions

Returns
SplitApkInstaller

install

public InstallMetrics install (long timeout, 
                TimeUnit unit)

Installs an Android application made of several APK files by streaming from files on host

Parameters
timeout long: installation timeout

unit TimeUnit

Returns
InstallMetrics InstallMetrics metrics for time elapsed during this installation

Throws
InstallException if the installation fails.

Protected methods

uploadApk

protected boolean uploadApk (String sessionId, 
                File fileToUpload, 
                int uniqueId, 
                long timeout, 
                TimeUnit unit)

Parameters
sessionId String

fileToUpload File

uniqueId int

timeout long

unit TimeUnit

Returns
boolean