Codota Logo
InstallException.<init>
Code IndexAdd Codota to your IDE (free)

How to use
com.android.ddmlib.InstallException
constructor

Best Java code snippets using com.android.ddmlib.InstallException.<init> (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: com.google.android.tools/ddmlib

public void removeRemotePackage(String remoteFilePath) throws InstallException {
  try {
    executeShellCommand("rm " + remoteFilePath, new NullOutputReceiver(), INSTALL_TIMEOUT);
  } catch (IOException e) {
    throw new InstallException(e);
  } catch (TimeoutException e) {
    throw new InstallException(e);
  } catch (AdbCommandRejectedException e) {
    throw new InstallException(e);
  } catch (ShellCommandUnresponsiveException e) {
    throw new InstallException(e);
  }
}
origin: com.android.tools.ddms/ddmlib

@Override
public void removeRemotePackage(String remoteFilePath) throws InstallException {
  try {
    executeShellCommand(String.format("rm \"%1$s\"", remoteFilePath),
        new NullOutputReceiver(), INSTALL_TIMEOUT_MINUTES, TimeUnit.MINUTES);
  } catch (IOException e) {
    throw new InstallException(e);
  } catch (TimeoutException e) {
    throw new InstallException(e);
  } catch (AdbCommandRejectedException e) {
    throw new InstallException(e);
  } catch (ShellCommandUnresponsiveException e) {
    throw new InstallException(e);
  }
}
origin: com.google.android.tools/ddmlib

public String uninstallPackage(String packageName) throws InstallException {
  try {
    InstallReceiver receiver = new InstallReceiver();
    executeShellCommand("pm uninstall " + packageName, receiver, INSTALL_TIMEOUT);
    return receiver.getErrorMessage();
  } catch (TimeoutException e) {
    throw new InstallException(e);
  } catch (AdbCommandRejectedException e) {
    throw new InstallException(e);
  } catch (ShellCommandUnresponsiveException e) {
    throw new InstallException(e);
  } catch (IOException e) {
    throw new InstallException(e);
  }
}
origin: com.android.tools.ddms/ddmlib

@Override
public void installPackage(String packageFilePath, boolean reinstall,
    String... extraArgs)
    throws InstallException {
  try {
    String remoteFilePath = syncPackageToDevice(packageFilePath);
    installRemotePackage(remoteFilePath, reinstall, extraArgs);
    removeRemotePackage(remoteFilePath);
  } catch (IOException e) {
    throw new InstallException(e);
  } catch (AdbCommandRejectedException e) {
    throw new InstallException(e);
  } catch (TimeoutException e) {
    throw new InstallException(e);
  } catch (SyncException e) {
    throw new InstallException(e);
  }
}
origin: com.google.android.tools/ddmlib

public String installRemotePackage(String remoteFilePath, boolean reinstall)
    throws InstallException {
  try {
    InstallReceiver receiver = new InstallReceiver();
    String cmd = String.format(reinstall ? "pm install -r \"%1$s\"" : "pm install \"%1$s\"",
              remoteFilePath);
    executeShellCommand(cmd, receiver, INSTALL_TIMEOUT);
    return receiver.getErrorMessage();
  } catch (TimeoutException e) {
    throw new InstallException(e);
  } catch (AdbCommandRejectedException e) {
    throw new InstallException(e);
  } catch (ShellCommandUnresponsiveException e) {
    throw new InstallException(e);
  } catch (IOException e) {
    throw new InstallException(e);
  }
}
origin: com.android.tools.ddms/ddmlib

@Override
public String uninstallPackage(String packageName) throws InstallException {
  try {
    InstallReceiver receiver = new InstallReceiver();
    executeShellCommand("pm uninstall " + packageName, receiver, INSTALL_TIMEOUT_MINUTES,
        TimeUnit.MINUTES);
    return receiver.getErrorMessage();
  } catch (TimeoutException e) {
    throw new InstallException(e);
  } catch (AdbCommandRejectedException e) {
    throw new InstallException(e);
  } catch (ShellCommandUnresponsiveException e) {
    throw new InstallException(e);
  } catch (IOException e) {
    throw new InstallException(e);
  }
}
origin: com.google.android.tools/ddmlib

public String installPackage(String packageFilePath, boolean reinstall)
    throws InstallException {
  try {
    String remoteFilePath = syncPackageToDevice(packageFilePath);
    String result = installRemotePackage(remoteFilePath, reinstall);
    removeRemotePackage(remoteFilePath);
    return result;
  } catch (IOException e) {
    throw new InstallException(e);
  } catch (AdbCommandRejectedException e) {
    throw new InstallException(e);
  } catch (TimeoutException e) {
    throw new InstallException(e);
  } catch (SyncException e) {
    throw new InstallException(e);
  }
}
origin: com.android.tools.ddms/ddmlib

@Override
public void installRemotePackage(String remoteFilePath, boolean reinstall,
    String... extraArgs) throws InstallException {
  try {
    InstallReceiver receiver = new InstallReceiver();
    StringBuilder optionString = new StringBuilder();
    if (reinstall) {
      optionString.append("-r ");
    }
    if (extraArgs != null) {
      optionString.append(Joiner.on(' ').join(extraArgs));
    }
    String cmd = String.format("pm install %1$s \"%2$s\"", optionString.toString(),
        remoteFilePath);
    executeShellCommand(cmd, receiver, INSTALL_TIMEOUT_MINUTES, TimeUnit.MINUTES);
    String error = receiver.getErrorMessage();
    if (error != null) {
      throw new InstallException(error);
    }
  } catch (TimeoutException e) {
    throw new InstallException(e);
  } catch (AdbCommandRejectedException e) {
    throw new InstallException(e);
  } catch (ShellCommandUnresponsiveException e) {
    throw new InstallException(e);
  } catch (IOException e) {
    throw new InstallException(e);
  }
}
origin: com.android.tools.ddms/ddmlib

if (sessionId == null) {
  Log.d(LOG_TAG, "Failed to establish session, quit installation");
  throw new InstallException("Failed to establish session");
  String message = String.format("Failed to finalize session : %1$s", errorMessage);
  Log.e(LOG_TAG, message);
  throw new InstallException(message);
  throw new InstallException("Failed to install all ");
throw new InstallException(e);
origin: com.android.tools.ddms/ddmlib

@Override
public void installPackages(@NonNull List<File> apks, boolean reinstall,
    @NonNull List<String> installOptions, long timeout, @NonNull TimeUnit timeoutUnit)
    throws InstallException {
  try {
    SplitApkInstaller.create(this, apks, reinstall, installOptions)
        .install(timeout, timeoutUnit);
  } catch (InstallException e) {
    throw e;
  } catch (Exception e) {
    throw new InstallException(e);
  }
}
origin: com.amazon.device.tools.build/builder

    Joiner.on(',').join(testedApks));
if (testedApks.size() > 1 && device.getApiLevel() < 21) {
  throw new InstallException("Internal error, file a bug, multi-apk applications"
      + " require a device with API level 21+");
origin: com.android.tools.build/builder

    Joiner.on(',').join(testedApks));
if (testedApks.size() > 1 && device.getApiLevel() < 21) {
  throw new InstallException("Internal error, file a bug, multi-apk applications"
      + " require a device with API level 21+");
origin: com.android.tools.build/builder

    Joiner.on(',').join(testedApks));
if (testedApks.size() > 1 && device.getApiLevel() < 21) {
  throw new InstallException(
      "Internal error, file a bug, multi-apk applications"
          + " require a device with API level 21+");
com.android.ddmlibInstallException<init>

Popular methods of InstallException

  • getCause
  • printStackTrace

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now