Android.Content.ContentProvider.CallingPackage Property
Return the package name of the caller that initiated the request being processed on the current thread.

Syntax

[get: Android.Runtime.Register("getCallingPackage", "()Ljava/lang/String;", "GetGetCallingPackageHandler")]
public string CallingPackage { get; }

See Also

Android.OS.Binder.CallingUid
Context.GrantUriPermission(string, Android.Net.Uri, Android.Net.Uri)

Value

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.SecurityExceptionif the calling package doesn't belong to the calling UID.

Remarks

Return the package name of the caller that initiated the request being processed on the current thread. The returned package will have been verified to belong to the calling UID. Returns null if not currently processing a request.

This will always return null when processing ContentProvider.GetType(Android.Net.Uri) or ContentProvider.GetStreamTypes(Android.Net.Uri, System.String) requests.

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1