Reference:Android.app.ActivityPendingResult

From Triled Wiki

Jump to: navigation, search


android.app
public final class android.app.ActivityPendingResult

java.lang.Object
android.app.ActivityPendingResult Parcelable

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).

Contents

[edit] Summary

[edit] Constants

      Value  
Creator   CREATOR        

[edit] Public Methods

        ComponentName   getTargetActivityClass ()
Return the class name of the activity that will be receiving this result.
        String   getTargetPackage ()
Return the package name of the activity that will be receiving this result.
        boolean  sendResult (int code, String data, Bundle ex)
Send a result back to the originating activity.
        void  writeToParcel (Parcel out)

[edit] Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
[edit] Methods inherited from interface android.os.Parcelable

writeToParcel

[edit] Details

[edit] Constants

[edit] public static final Creator CREATOR

[edit] Public Methods

[edit] 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.

[edit] 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.

[edit] 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.

[edit] public void writeToParcel(Parcel out)

[edit] References

Personal tools