Udostępnij za pośrednictwem


PendingIntent.CreatorPackage Property

Definition

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

public string? CreatorPackage { [Android.Runtime.Register("getCreatorPackage", "()Ljava/lang/String;", "")] get; }
[<get: Android.Runtime.Register("getCreatorPackage", "()Ljava/lang/String;", "")>]
member this.CreatorPackage : string

Property Value

The package name of the PendingIntent.

Attributes

Remarks

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

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

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