PackageManager.GetPackageUid Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetPackageUid(String, PackageInfoFlags) |
Return the UID associated with the given package name. |
GetPackageUid(String, PackageManager+PackageInfoFlags) |
GetPackageUid(String, PackageInfoFlags)
Return the UID associated with the given package name.
[Android.Runtime.Register("getPackageUid", "(Ljava/lang/String;I)I", "GetGetPackageUid_Ljava_lang_String_IHandler", ApiSince=24)]
public abstract int GetPackageUid (string packageName, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("getPackageUid", "(Ljava/lang/String;I)I", "GetGetPackageUid_Ljava_lang_String_IHandler", ApiSince=24)>]
abstract member GetPackageUid : string * Android.Content.PM.PackageInfoFlags -> int
Parameters
- packageName
- String
The full name (i.e. com.google.apps.contacts) of the desired package.
- flags
- PackageInfoFlags
Returns
Returns an integer UID who owns the given package name.
- Attributes
Remarks
Return the UID associated with the given package name.
Note that the same package will have different UIDs under different UserHandle
on the same device.
Use #getPackageUid(String, PackageInfoFlags)
when long flags are needed.
Java documentation for android.content.pm.PackageManager.getPackageUid(java.lang.String, int)
.
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
GetPackageUid(String, PackageManager+PackageInfoFlags)
[Android.Runtime.Register("getPackageUid", "(Ljava/lang/String;Landroid/content/pm/PackageManager$PackageInfoFlags;)I", "GetGetPackageUid_Ljava_lang_String_Landroid_content_pm_PackageManager_PackageInfoFlags_Handler", ApiSince=33)]
public virtual int GetPackageUid (string packageName, Android.Content.PM.PackageManager.PackageInfoFlags flags);
[<Android.Runtime.Register("getPackageUid", "(Ljava/lang/String;Landroid/content/pm/PackageManager$PackageInfoFlags;)I", "GetGetPackageUid_Ljava_lang_String_Landroid_content_pm_PackageManager_PackageInfoFlags_Handler", ApiSince=33)>]
abstract member GetPackageUid : string * Android.Content.PM.PackageManager.PackageInfoFlags -> int
override this.GetPackageUid : string * Android.Content.PM.PackageManager.PackageInfoFlags -> int
Parameters
- packageName
- String
Returns
- Attributes