Struct InstallApks

Source
pub struct InstallApks { /* private fields */ }
Expand description

§Deploy APKs to a connected device

After you generate a set of APKs, bundletool can deploy the right combination of APKs from that set to a connected device.

For example, if you have a connected device running Android 5.0 (API level 21) or higher, bundletool pushes the base APK, feature module APKs, and configuration APKs required to run your app on that device. Alternatively, if your connected device is running Android 4.4 (API level 20) or lower, bundletool looks for a compatible multi-APK and deploys it to your device.

To deploy your app from an APK set, use theinstall-apks command and specify the path of the APK set using the --apks=/path/to/apks flag, as shown below. (If you have multiple devices connected, specify a target device by adding the --device-id=serial-id flag.)

Implementations§

Source§

impl InstallApks

Source

pub fn new(apks: &Path) -> Self

Specifies path to set of apks to install it on your device or emulator

Source

pub fn local_testing(&mut self, local_testing: bool) -> &mut Self

If you’re using the --local-testing flag with the build-apks command, for local testing to work correctly, you need to use install-apks to install your APKs

Source

pub fn device_id(&mut self, device_id: String) -> &mut Self

If you have multiple devices connected, specify a target device by adding the --device-id=serial-id flag

Source

pub fn run(&self) -> Result<()>

Runs bundletool commands to install apks on your device or emulator

Trait Implementations§

Source§

impl Debug for InstallApks

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for InstallApks

Source§

fn default() -> InstallApks

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.