Freigeben über


PendingIntent.CreatorUid Property

Definition

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

public int CreatorUid { [Android.Runtime.Register("getCreatorUid", "()I", "")] get; }
[<get: Android.Runtime.Register("getCreatorUid", "()I", "")>]
member this.CreatorUid : int

Property Value

The uid of the PendingIntent, or -1 if there is none associated with it.

Attributes

Remarks

Return the uid of the application that created this PendingIntent, that is the identity under which you will actually be sending the Intent. The returned integer is supplied by the system, so that an application can not spoof its uid.

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

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