congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ResolveInfo.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
android.content.pm.ResolveInfo

Best Java code snippets using android.content.pm.ResolveInfo.toString (Showing top 5 results out of 315)

origin: robolectric/robolectric

private static String getPackageName(ResolveInfo resolveInfo) {
 if (resolveInfo.resolvePackageName != null) {
  return resolveInfo.resolvePackageName;
 } else if (resolveInfo.activityInfo != null) {
  return resolveInfo.activityInfo.packageName;
 } else if (resolveInfo.serviceInfo != null) {
  return resolveInfo.serviceInfo.packageName;
 } else if (resolveInfo.providerInfo != null) {
  return resolveInfo.providerInfo.packageName;
 }
 throw new IllegalStateException(
   "Could not find package name for ResolveInfo " + resolveInfo.toString());
}
origin: org.robolectric/shadows-framework

private static String getPackageName(ResolveInfo resolveInfo) {
 if (resolveInfo.resolvePackageName != null) {
  return resolveInfo.resolvePackageName;
 } else if (resolveInfo.activityInfo != null) {
  return resolveInfo.activityInfo.packageName;
 } else if (resolveInfo.serviceInfo != null) {
  return resolveInfo.serviceInfo.packageName;
 } else if (resolveInfo.providerInfo != null) {
  return resolveInfo.providerInfo.packageName;
 }
 throw new IllegalStateException(
   "Could not find package name for ResolveInfo " + resolveInfo.toString());
}
origin: stackoverflow.com

 final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
final List <ResolveInfo> pkgAppsList = getPackageManager().queryIntentActivities( mainIntent, 0);

for(ResolveInfo resolve : pkgAppsList)
{
  Log.d("MY_APP", resolve.toString());
}
origin: com.willowtreeapps/oak-demos

  @Override
  public String toString() {
    StringBuilder builder = new StringBuilder();
    builder.append("[");
    builder.append("resolveInfo:").append(resolveInfo.toString());
    builder.append("; weight:").append(new BigDecimal(weight));
    builder.append("]");
    return builder.toString();
  }
}
origin: com.actionbarsherlock/actionbarsherlock

  @Override
  public String toString() {
    StringBuilder builder = new StringBuilder();
    builder.append("[");
    builder.append("resolveInfo:").append(resolveInfo.toString());
    builder.append("; weight:").append(new BigDecimal(weight));
    builder.append("]");
    return builder.toString();
  }
}
android.content.pmResolveInfotoString

Popular methods of ResolveInfo

  • loadLabel
  • loadIcon
  • <init>
  • getIconResource
  • getClass
  • writeToParcel

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • scheduleAtFixedRate (Timer)
  • getSystemService (Context)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now