AppWidgetManager.GetInstalledProvidersForPackage(String, UserHandle) 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.
Gets the AppWidget providers for the given package and user profile.
[Android.Runtime.Register("getInstalledProvidersForPackage", "(Ljava/lang/String;Landroid/os/UserHandle;)Ljava/util/List;", "GetGetInstalledProvidersForPackage_Ljava_lang_String_Landroid_os_UserHandle_Handler", ApiSince=26)]
public virtual System.Collections.Generic.IList<Android.Appwidget.AppWidgetProviderInfo> GetInstalledProvidersForPackage (string packageName, Android.OS.UserHandle? profile);
[<Android.Runtime.Register("getInstalledProvidersForPackage", "(Ljava/lang/String;Landroid/os/UserHandle;)Ljava/util/List;", "GetGetInstalledProvidersForPackage_Ljava_lang_String_Landroid_os_UserHandle_Handler", ApiSince=26)>]
abstract member GetInstalledProvidersForPackage : string * Android.OS.UserHandle -> System.Collections.Generic.IList<Android.Appwidget.AppWidgetProviderInfo>
override this.GetInstalledProvidersForPackage : string * Android.OS.UserHandle -> System.Collections.Generic.IList<Android.Appwidget.AppWidgetProviderInfo>
Parameters
- packageName
- String
The package for which to get providers. If null, this method is
equivalent to #getInstalledProvidersForProfile(UserHandle)
.
- profile
- UserHandle
The profile for which to get providers. Passing null is equivalent to querying for only the calling user.
Returns
The installed providers, or an empty list if none are found for the given package and user.
- Attributes
Remarks
Gets the AppWidget providers for the given package and user profile. User profile can only be the current user or a profile of the current user. For example, the current user may have a corporate profile. In this case the parent user profile has a child profile, the corporate one.
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.