FileDocCategorySizeDatePackage
SearchIndexableData.javaAPI DocAndroid 5.1 API5050Thu Mar 12 22:22:10 GMT 2015android.provider

SearchIndexableData

public abstract class SearchIndexableData extends Object
The Indexable data for Search. This abstract class defines the common parts for all search indexable data.
hide

Fields Summary
public android.content.Context
context
The context for the data. Will usually allow retrieving some resources.
public Locale
locale
The locale for the data
public boolean
enabled
Tells if the data will be included into the search results. This is application specific.
public int
rank
The rank for the data. This is application specific.
public String
key
The key for the data. This is application specific. Should be unique per data as the data should be able to be retrieved by the key.
public int
userId
The UserID for the data (in a multi user context). This is application specific and -1 is the default non initialized value.
public String
className
The class name associated with the data. Generally this is a Fragment class name for referring where the data is coming from and for launching the associated Fragment for displaying the data. This is used only when the data is provided "locally". If the data is provided "externally", the relevant information come from the {@link SearchIndexableData#intentAction} and {@link SearchIndexableData#intentTargetPackage} and {@link SearchIndexableData#intentTargetClass}.
public String
packageName
The package name for retrieving the icon associated with the data.
public int
iconResId
The icon resource ID associated with the data.
public String
intentAction
The Intent action associated with the data. This is used when the {@link SearchIndexableData#className} is not relevant.
public String
intentTargetPackage
The Intent target package associated with the data.
public String
intentTargetClass
The Intent target class associated with the data.
Constructors Summary
public SearchIndexableData()
Default constructor.


           
      
        locale = Locale.getDefault();
        enabled = true;
    
public SearchIndexableData(android.content.Context ctx)
Constructor with a {@link Context}.

param
ctx the Context

        this();
        context = ctx;
    
Methods Summary
public java.lang.StringtoString()

        final StringBuilder sb = new StringBuilder();
        sb.append("SearchIndexableData[context: ");
        sb.append(context);
        sb.append(", ");
        sb.append("locale: ");
        sb.append(locale);
        sb.append(", ");
        sb.append("enabled: ");
        sb.append(enabled);
        sb.append(", ");
        sb.append("rank: ");
        sb.append(rank);
        sb.append(", ");
        sb.append("key: ");
        sb.append(key);
        sb.append(", ");
        sb.append("userId: ");
        sb.append(userId);
        sb.append(", ");
        sb.append("className: ");
        sb.append(className);
        sb.append(", ");
        sb.append("packageName: ");
        sb.append(packageName);
        sb.append(", ");
        sb.append("iconResId: ");
        sb.append(iconResId);
        sb.append(", ");
        sb.append("intentAction: ");
        sb.append(intentAction);
        sb.append(", ");
        sb.append("intentTargetPackage: ");
        sb.append(intentTargetPackage);
        sb.append(", ");
        sb.append("intentTargetClass: ");
        sb.append(intentTargetClass);
        sb.append("]");

        return sb.toString();