Sdílet prostřednictvím


PendingIntent.CreatorUserHandle Property

Definition

Return the user handle of the application that created this PendingIntent, that is the user under which you will actually be sending the Intent.

public Android.OS.UserHandle CreatorUserHandle { [Android.Runtime.Register("getCreatorUserHandle", "()Landroid/os/UserHandle;", "")] get; }
[<get: Android.Runtime.Register("getCreatorUserHandle", "()Landroid/os/UserHandle;", "")>]
member this.CreatorUserHandle : Android.OS.UserHandle

Property Value

The user handle of the PendingIntent

Attributes

Remarks

Return the user handle of the application that created this PendingIntent, that is the user under which you will actually be sending the Intent. The returned UserHandle is supplied by the system, so that an application can not spoof its user. See android.os.Process#myUserHandle() Process.myUserHandle() for more explanation of user handles.

<p class="note">Be careful about how you use this. All this tells you is who created the PendingIntent. It does <strong>not</strong> tell you who handed the PendingIntent to you: that is, PendingIntent objects are intended to be passed between applications, so the PendingIntent you receive from an application could actually be one it received from another application, meaning the result you get here will identify the original application. Because of this, you should only use this information to identify who you expect to be interacting with through a #send call, not who gave you the PendingIntent.</p>

Java documentation for android.app.PendingIntent.getCreatorUserHandle().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to