android.app
public
final
class
android.app.ActivityPendingResult
This object provides a token for an existing activity, which can be used to
send results back to that activity, whether or not that activity is
currently running. Instances are created with
createActivityPendingResult(int, boolean).
Summary
Constants
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Constants
public
static
final
Creator
CREATOR
Public Methods
public
ComponentName
getTargetActivityClass()
Return the class name of the activity that will be receiving this
result. The returned string is supplied by the system, so that an
activity can not spoof its name.
Returns
- The class name of the target activity, or null if the activity
result is no longer valid.
public
String
getTargetPackage()
Return the package name of the activity that will be receiving this
result. The returned string is supplied by the system, so that an
activity can not spoof its package.
Returns
- The package name of the target activity, or null if the activity
result is no longer valid.
public
boolean
sendResult(int code, String data, Bundle ex)
Send a result back to the originating activity. See
onActivityResult(int, int, String, Bundle) for more information on activity
results.
Parameters
| code
| Standard result code. |
| data
| Data associated with the result. |
| ex
| Any additional data. |
Returns
- Returns true if the result was successfully sent, else false. A
false may be returned, for example, if this is a one-shot result
that has already been used or the target activity has finished.
public
void
writeToParcel(Parcel out)