public class TargetActivity
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TargetActivity.RecencyComparatorProvider
Comparator used to sort
TargetActivity based on the recency of their previous
selection and their default order as fallback when they have never been selected. |
| Constructor and Description |
|---|
TargetActivity(android.content.Context context,
android.content.pm.ResolveInfo resolveInfo,
long lastSelection)
Plain java model for a sharing target activity.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
getActivityLabelResId()
Retrieve the textual label res id of the Activity.
|
java.lang.String |
getActivityName()
Retrive the name of the target activity.
|
android.net.Uri |
getIconUri()
Retrieve the Uri used to access to the target application launcher icon.
|
java.lang.String |
getId()
Retrieve a unique id used to identify target activity.
|
long |
getLastSelection()
Return a timestamp of the last selection inside the sharing dialog from you application.
|
java.lang.String |
getPackageName()
Retrieve the package name of the target activity.
|
int |
hashCode() |
boolean |
isMailClient()
Used to know if the target activity is a mail client.
|
public TargetActivity(android.content.Context context,
android.content.pm.ResolveInfo resolveInfo,
long lastSelection)
context - context used to load target activity label.resolveInfo - ResolveInfo linked to the target activity.lastSelection - time stamp in milli of last selection.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getId()
public java.lang.String getPackageName()
public java.lang.String getActivityName()
public int getActivityLabelResId()
public android.net.Uri getIconUri()
public boolean isMailClient()
public long getLastSelection()